string_split
string_split — breaks a string into individual words.
string_split (string, delimiters, max_words)
stringAny character string.
delimitersA character string containing delimiter characters.
max_wordsThe maximum number of words to separate.
A list containing at most (max_words + 1)
elements, each of which is a string.
This function breaks a string into individual words wherever it finds any
one of the characters in the delimiters string. If
max_words is zero or less, there is no limit to
the number of words which may be generated. If
max_words is greater than zero, then at most
max_words words will be generated. If there are
any characters remaining in the string once max_words
words have been generated, then the remaining characters will be returned as
the last element in the result list. If delimiters is
the empty string, "", then the input string will be split at any white
space.
Gamma>string_split("This is a test","",0);("This" "is" "a" "test")Gamma>string_split("This is a test"," ",2);("This" "is" "a test")Gamma>string_split("This is a test","ie",0);("Th" "s " "s a t" "st")Gamma>string_split("12:05:29",":",-1);("12" "05" "29")Gamma>