Hi,
Here is a snippet that should get you there.
BU
;;STRPARSE FOR PARSING STRING (and keeping null tokens)
(defun STRPARSE (STRNG CHS / LEN C L S CHSL CNT)
;;delim==one-of-chs.
(setq CHSL (STRTOL CHS))
(setq LEN (strlen STRNG)
S ""
CNT (1+ LEN)
)
(while (> (setq CNT (1- CNT)) 0)
(setq C (substr STRNG CNT 1))
(if (member C CHSL)
(if (/= CNT LEN)
;; "1,2," -> ("1" "2"

and not ("1" "2" ""

(setq L (cons S L)
S ""
)
)
(setq S (strcat C S))
)
)
(cons S L)
;; ",1,2" -> ("" "1" "2"

)
;------------------------------------------------------------------------------
(defun STRTOL (S / LST C)
(repeat (setq C (strlen S))
(setq LST (cons (substr S C 1) LST)
C (1- C)
)
)
LST
)
;------------------------------------------------------------------------------
;(setq I_QTY (length (STRPARSE "123 456 789" " "

)) ;i.e. of use- this returns ("123" "456" "789"

(defun RUNTEST ()
(setq NEWLIST (list))
(foreach ITEM (STRPARSE "123 456 789" " "

;(setq REALITEM (atof ITEM))
(setq NEWLIST (cons (atof ITEM) NEWLIST))
)
(reverse NEWLIST)
)