Regex.split_13kaya
Split a string into substrings.
Usage
[String] split( String patt, String str, Int limit=0, Bool allowempty=false )
Arguments
patt The pattern string
str The String to split
limit The maximum number of pieces (from the left) to split str into. If this is parameter is omitted or set to zero an unlimited number of pieces will be allowed.
allowempty If this is true, then consecutive delimeters will be treated as having an empty string between them. If it is false (or omitted) then consecutive delimeters will be treated as one.
Overview
Using patt as a delimeter, split str into substrings.
-
x = "a,b,c";
xs = split(",",x); // ["a","b","c"]
xs = split(",",x,1); // ["a","b,c"]
Releases
4 releases since Debian 5.0 (Lenny); the text changed 3 times.