As far as I know, there is no ready-to-use splitting function in the cl standard.
However you can use the cl-split-sequence library, available through
quicklisp.
Assuming quicklisp is installed,
- Code: Select all
CL-USER> (ql:quickload :split-sequence)
To load "split-sequence":
Load 1 ASDF system:
split-sequence
; Loading "split-sequence"
(:SPLIT-SEQUENCE)
CL-USER> (use-package :split-sequence)
T
CL-USER> (split-sequence #\space "This is an example.")
("This" "is" "an" "example.")
19
CL-USER>
The code for split-sequence can be read online at the following url:
http://common-lisp.net/project/clbuild/ ... uence.lisp