about summary refs log tree commit diff
path: root/doc/manual/expressions/builtins.xml
diff options
context:
space:
mode:
authorLinus Heckemann <git@sphalerite.org>2017-02-19T18·54+0000
committerLinus Heckemann <git@sphalerite.org>2017-02-20T14·23+0000
commitb8564987a3d9455ee779ca1dd63b1dc9f8ee72d9 (patch)
tree6a61b32327a2780332585c7c3bf56a2a0d76b447 /doc/manual/expressions/builtins.xml
parent302386f775eea309679654e5ea7c972fb6e7b9af (diff)
Document toString better
Diffstat (limited to 'doc/manual/expressions/builtins.xml')
-rw-r--r--doc/manual/expressions/builtins.xml16
1 files changed, 12 insertions, 4 deletions
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</programlisting>
 
     <listitem><para>Convert the expression
     <replaceable>e</replaceable> to a string.
-    <replaceable>e</replaceable> can be a string (in which case
-    <function>toString</function> is a no-op), a path (e.g.,
-    <literal>toString /foo/bar</literal> yields
-    <literal>"/foo/bar"</literal> or a set containing <literal>{ __toString = self: ...; }</literal>.</para></listitem>
+    <replaceable>e</replaceable> can be:
+    <itemizedlist>
+        <listitem>a string (in which case the string is returned unmodified)</listitem>
+        <listitem>a path (e.g., <literal>toString /foo/bar</literal> yields <literal>"/foo/bar"</literal></listitem>
+        <listitem>a set containing <literal>{ __toString = self: ...; }</literal></listitem>
+        <listitem>an integer</listitem>
+        <listitem>a list, in which case the string representations of its elements are joined with spaces</listitem>
+        <listitem>a boolean (<literal>false</literal> yields <literal>""</literal>, <literal>true</literal> yields <literal>"1"</literal></listitem>
+        <listitem><literal>null</literal>, which yields the empty string.</listitem>
+    </itemizedlist>
+    </para>
+    </listitem>
 
   </varlistentry>