next up previous

12.2.6 Creating Multifield Values from Strings.

This function constructs a multifield value from a string by using each field in a string as a field in a new multifield value.

Syntax

(explode$ <string-expression>)

A new multifield value is created in which each delimited field in order in <string-expression> is taken to be a field in the new multifield value which is returned. A string with no fields creates a multifield value of length zero. Fields other than symbols, strings, integer, floats, or instances names (such as parentheses or variables) are converted to strings.

Example

CLIPS> (explode$ "hammer drill saw screw")
(hammer drill saw screw)
CLIPS> (explode$ "1 2 abc 3 4 \"abc\"  \"def\"")
(1 2 abc 3 4 "abc" "def")
CLIPS> (explode$ "?x ~ )")
("?x" "~" ")")
CLIPS>


next up previous