std-string->strlist


Synopsis

(std-string->strlist <str> <delims>)

Description

STD-STRING->STRLIST is the same as STD-STRTOK. It splits a string into a list of strings. It omits all characters in delims which is a set of delimiting characters. The order of chars in delim is not important.

It is the complement to STD-STRLIST->STRING, but a roundtrip
(std-strlist->string (std-string->strlist str d) d) may not return the same result because multiple whitespace and null tokens are deleted.

This function is also widely used in handling DCL list_box controls with multiple selections.

Example

(std-string->strlist "  , 1, 2" ", ") => ("1" "2")

Arguments

str: a string.

delim: a string as set of chars

Return Value

A list of strings or nil.

Side Effects

None.

Module

(std-require 'STDSTR)

Defined in STDSTR