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-08-15 20:04:11 +00:00
2011-10-10 21:32:34 +00:00
2017-03-21 18:06:13 +01:00
2014-08-21 21:50:19 +02:00
2017-05-02 15:46:10 +02:00
2017-05-02 12:07:56 +02:00
2017-05-05 17:45:22 +02:00
2014-08-21 21:50:19 +02:00
2014-07-16 16:02:05 +02:00
2014-08-28 18:57:13 +02:00
2014-08-28 18:57:13 +02:00
2014-08-28 18:57:13 +02:00
2016-04-16 19:58:26 -04:00
2017-07-06 22:37:53 +02:00
2016-08-17 17:19:32 +02:00
2014-02-26 18:59:01 +01:00
2006-07-21 13:21:43 +00:00
2006-07-21 13:21:43 +00:00
2013-10-17 01:12:43 +02:00
2011-10-10 21:32:34 +00:00
2016-08-10 18:05:35 +02:00
2013-11-18 10:21:12 +00:00
2013-11-18 10:21:12 +00:00
2012-09-11 19:14:15 -04:00
2017-07-17 13:13:18 +02:00
2016-03-24 14:45:55 +01:00
2014-08-21 21:50:19 +02:00
2007-09-11 13:32:04 +00:00
2007-08-28 09:21:47 +00:00
2009-03-17 17:11:55 +00:00
2015-11-04 16:37:49 +01:00
2008-08-14 09:26:30 +00:00
2008-08-14 09:26:30 +00:00
2009-03-17 17:11:55 +00:00
2014-08-21 21:50:19 +02:00
2009-03-17 17:11:55 +00:00
2016-09-12 13:40:07 +02:00
2014-02-26 18:00:46 +01:00
2006-07-21 13:21:43 +00:00
2017-07-04 15:07:41 +02:00
2012-01-26 13:04:50 +00:00
2012-09-11 19:14:15 -04:00
2016-08-10 18:05:35 +02:00
2017-07-14 12:11:33 -04:00
2014-08-21 21:50:19 +02:00
2017-05-08 15:42:59 +02:00
2017-05-15 12:23:21 +02:00
2016-04-25 19:18:45 +02:00
2015-07-31 20:26:44 +02:00
2012-09-11 19:14:15 -04:00
2014-08-21 21:50:19 +02:00
2017-05-15 12:23:21 +02:00
2017-05-15 12:23:21 +02:00
2012-09-11 19:14:15 -04:00
2016-08-10 11:13:11 -04:00
2016-05-31 11:48:05 +02:00
2016-05-31 13:07:24 +02:00
2017-02-24 17:29:02 +01:00
2017-02-07 15:56:32 -05:00
2014-02-06 13:51:57 +01:00
2009-03-23 15:16:36 +00:00
2013-11-25 18:47:03 +01:00
2015-02-17 16:42:54 +01:00
2016-08-17 17:19:32 +02:00
2016-08-10 18:05:35 +02:00
2017-05-01 17:30:16 +02:00
2016-08-10 18:05:35 +02:00
2017-03-21 18:06:13 +01:00
2016-04-14 15:24:06 +02:00
2011-08-08 14:08:38 +00:00
2016-04-11 16:20:15 +02:00
2017-05-29 16:14:10 +02:00
2017-04-25 18:59:18 +02:00
2017-04-13 20:53:23 +02:00
2007-08-13 13:15:02 +00:00
2009-03-17 17:11:55 +00:00
2016-10-19 15:19:38 +02:00
2016-09-08 18:22:28 +02:00
2017-07-30 12:32:45 +01:00
2017-07-30 12:32:45 +01:00
2012-12-04 14:47:50 +01:00
2012-12-04 14:47:50 +01:00
2016-08-10 18:05:35 +02:00