doc: add an example for builtins.substring
This commit is contained in:
parent
9a1320af29
commit
ed39532dda
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in a new issue