string explode - part-cw/lambdanative GitHub Wiki
(string-explode str seplst)
string-explode splits a string with multiple separators. This time the separators are maintained.
Parameter | Description |
---|---|
str | Input string |
seplst | List of separators |
Example
Example 1: Split a string at every occurrence of a a comma, semicolor, or fullstop.
> (define mystr "This is a test, it continues here; yes it does. So does this")
> (string-explode mystr '(#\; #\, #\.))
("This is a test" "," " it continues here" ";" " yes it does" "." " So does this")