Public string[] Split (String regex, int limit)
Limit n is greater than 0, the pattern (pattern) is applied n-1 times
About String.Split (string regex, int limit) String s = "Boo:and:foo"
About String.Split (String regex, int limit) s.split (":", 2)
About String.Split (String regex, int limit)//result is {"Boo", "And:foo"}
Limit n is less than 0, the pattern (pattern) is applied indefinitely
About String.Split (string regex, int limit) String s = "Boo:and:foo"
About String.Split (String regex, int limit) s.split (":",-2)
About String.Split (String regex, int limit)//result is {"Boo", "and", "foo"}
Limit n equals 0, the pattern (pattern) is applied indefinitely and the trailing empty string is omitted
About String.Split (string regex, int limit) String s = "Boo:and:foo"
About String.Split (String regex, int limit) s.split ("O",-2)
Result is {"B", "", "And:f", "" "," "}
S.split ("O", 0)
Result is {"B", "", "And:f"}
Example: string "Boo:and:foo"
Regex Limit Result
2 {"Boo", "And:foo"}
5 {"Boo", "and", "foo"}
-2 {"Boo", "and", "foo"}
o 5 {"B", "", ": And:f", "", ""}
o-2 {"B", "", ": And:f", "", ""}
o 0 {"B", "", ": And:f"}
String.Split (String regex, int limit)