Separate a string using a set of character delimiters. Break the string using any of the given characters as a delimiter. Subsequent delimiter characters are merged and treated as one delimiter.
splitc@("abc|:|xyz", ":|") = [ "abc", "xyz" ]
Note the similarity of this function to words$()’s behavior. The following two expressions are equivalent.
words$(str$, 2, 2)
splitc@(str$, " \t\n")[2]$
Params
str$ | the source string |
delims$ | a string of characters to used as delimiters |
Returns
Each part of the string between delimiters in a new vector.