split
Splits a string at into parts based on in-string separators.
Syntax
-
split(s, sep)
-
s
is a string -
sep
is a string
-
-
split(s, L)
-
s
is a string -
L
is a list of strings
-
Description
split(s, sep)
splits the string s
at each occurrence of the sequence sep
and returns the parts (in order) in a list; the separating sequence is not included in the output strings.
split(s, L)
splits the string s
at each occurrence of any of the sequences in L
and returns the parts (in order) in a list; the separating sequences are not included in the output strings.
Examples
split("526,42,147,632,563,012", ",")
526 42 147 632 563 012
split("526,42,147;632,563,012", '(",", ";"))
526 42 147 632 563 012