doc: add an example for builtins.substring

This commit is contained in:
Domen Kožar 2016-08-11 12:32:24 +02:00
parent 9a1320af29
commit ed39532dda

View File

@ -853,7 +853,14 @@ builtins.sort builtins.lessThan [ 483 249 526 147 42 77 ]
len</replaceable> lies beyond the end of the string, only the
substring up to the end of the string is returned.
<replaceable>start</replaceable> must be
non-negative.</para></listitem>
non-negative. For example,
<programlisting>
builtins.substring 0 3 "nixos"
</programlisting>
evaluates to <literal>"nix"</literal>.
</para></listitem>
</varlistentry>