mirror of
https://github.com/NixOS/nix.git
synced 2024-11-22 06:42:28 +00:00
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 New Issue
Block a user