Nicolas B. Pierron
b8867a0239
Add builtins.string function.
The function 'builtins.split' takes a POSIX extended regular expression
and an arbitrary string. It returns a list of non-matching substring
interleaved by lists of matched groups of the regular expression.
```nix
with builtins;
assert split "(a)b" "abc" == [ "" [ "a" ] "c" ];
assert split "([ac])" "abc" == [ "" [ "a" ] "b" [ "c" ] "" ];
assert split "(a)|(c)" "abc" == [ "" [ "a" null ] "b" [ null "c" ] "" ];
assert split "([[:upper:]]+)" " FOO "
== [ " " [ "FOO" ] " " ];
```
2017-08-15 20:04:11 +00:00
..
2017-07-30 12:32:45 +01:00
2017-07-30 12:32:45 +01:00
2013-09-03 13:17:51 +00:00
2015-07-23 23:11:08 +02:00
2017-01-26 20:40:33 +01:00
2017-07-30 12:32:45 +01:00
2016-02-04 14:48:42 +01:00
2017-06-20 12:13:17 +02:00
2017-07-30 12:32:45 +01:00
2017-07-26 17:29:09 +02:00
2017-07-30 12:32:45 +01:00
2017-07-20 13:50:25 +02:00
2017-07-30 12:32:45 +01:00
2014-07-04 13:34:15 +02:00
2017-07-30 12:32:45 +01:00
2017-04-14 14:42:20 +02:00
2016-10-18 20:22:25 +02:00
2016-10-18 20:22:25 +02:00
2014-09-18 12:00:40 +02:00
2017-07-30 12:32:45 +01:00
2017-07-30 12:32:45 +01:00
2017-07-30 12:32:45 +01:00
2017-08-15 20:04:11 +00:00
2016-04-14 12:50:01 +02:00
2017-02-08 21:51:02 +02:00
2016-08-29 17:29:24 +02:00
2016-08-29 17:29:24 +02:00
2016-01-05 00:40:40 +01:00
2012-07-18 14:59:03 -04:00
2017-04-25 11:20:37 +02:00