From b8564987a3d9455ee779ca1dd63b1dc9f8ee72d9 Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Sun, 19 Feb 2017 18:54:18 +0000 Subject: Document toString better --- doc/manual/expressions/builtins.xml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/manual/expressions/builtins.xml b/doc/manual/expressions/builtins.xml index 063bc04be483..6c38941c01ba 100644 --- a/doc/manual/expressions/builtins.xml +++ b/doc/manual/expressions/builtins.xml @@ -1023,10 +1023,18 @@ in foo Convert the expression e to a string. - e can be a string (in which case - toString is a no-op), a path (e.g., - toString /foo/bar yields - "/foo/bar" or a set containing { __toString = self: ...; }. + e can be: + + a string (in which case the string is returned unmodified) + a path (e.g., toString /foo/bar yields "/foo/bar" + a set containing { __toString = self: ...; } + an integer + a list, in which case the string representations of its elements are joined with spaces + a boolean (false yields "", true yields "1" + null, which yields the empty string. + + + -- cgit 1.4.1