string.split(string delimiter) splits up astring into a list of substrings that are delimited by delimiter. If astring is empty, a list with one empty string is returned.
string.split(char delimiter) is a variant that uses a single character as delimiter
string.split(string delimiter, int maxcnt) is a variant that allows you to specify maxcnt - a maximum count of parts to be split off. The length of the result is at most maxcnt plus one.
string.split(char delimiter, int maxcnt) is a variant that uses a single character as delimiter
list(A).split(delimiter, int maxcnt) is a variant that does not split a string but a list.
list(A).split(delimiter) is a variant that lets you limit the number of parts
string.split() is special variant of split that does not use a specific delmiter but splits a string into parts by groups of one or more white spaces. Note that this is not the same as split(' '), since the later one interpretes sequences of whitespaces as multiple delimiters while split() interpretes those as only one delimiter.
"::two::three".split("::") == [ "", "two", "three" ]
"one,two,three".split(",", 1) == [ "one", "twothree" ]
[ 1, 0, 2, 3, 0, 4 ].split(0) == [ [ 1 ], [ 2, 3 ], [ 4 ] ]
[ 1, 0, 2, 3, 0, 4 ].split(0, 1) == [ [ 1 ], [ 2, 3, 0, 4 ] ]
" one two three ".split() == ["one", "two", "three"] " ".split() == []
