diff options
author | Domen Kožar <domen@dev.si> | 2016-08-11 12:32:24 +0200 |
---|---|---|
committer | Domen Kožar <domen@dev.si> | 2016-08-11 12:32:24 +0200 |
commit | ed39532ddaa561acfb89bd8e29899cdb835b2ea2 (patch) | |
tree | 1c617cffe57a43299b1a844e6b955a852f1b8347 /doc/manual | |
parent | 9a1320af29f60ed23839aaabfbf81ead5e1c3758 (diff) |
doc: add an example for builtins.substring
Diffstat (limited to 'doc/manual')
-rw-r--r-- | doc/manual/expressions/builtins.xml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/manual/expressions/builtins.xml b/doc/manual/expressions/builtins.xml index 5fd93c831..6ac802343 100644 --- a/doc/manual/expressions/builtins.xml +++ b/doc/manual/expressions/builtins.xml @@ -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> |