match-split-list
Name
match-split-list -- Splits a string at a list of targets and returns the resulting list of tokens
Synopsis
(match-split-list string target-list)
Description
Splits string at every target in target-list with (match-split),
returning the whole collection of tokens as a list.
- string
The string to split.
- target-list
A list of target strings which are the delimters between tokens.
Author
Norman Walsh, <ndw@nwalsh.com>
Source Code
(define (match-split-list string target-list)
;; Splits a string at a list of targets and returns the resulting list of tokens
(let loop ((result (list string)) (tlist target-list))
(if (null? tlist)
result
(loop (match-split-string-list result (car tlist))
(cdr tlist)))))