std-strsplit | ![]() |
STD-STRSPLIT
splits a string into a list of strings keeping null tokens. It omits all characters in delim, which is a string seperating the list entries. The order of chars in delim is important.
Note that STD-STRSPLIT
is useful for reading comma delimited lists from a file. It keeps empty strings. A similar function is std-strtok which does not keep null tokens and is therefore unsuitable for CDF files.
It is the exact complement to STD-STRJOIN
, a complete roundtrip (STD-STRJOIN (STD-STRSPLIT s d) d)
is possible.
(std-strsplit ",1,2" ",") => ("" "1" "2")
str: a string.
delim: a string.
A list of strings or nil.
None.
(std-require 'STDSTR)
Defined in STDSTR