Skip to content
Chris Petersen edited this page Oct 16, 2014 · 1 revision

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")
Clone this wiki locally