;;------------------------------ ;;Don: (02-09-02) ;; ;;First let me point out that the one you call JohnU is astually ;;Marc'Antonio's from November. ;; ;;As Marc'Antonio sagely reminded us, setting string symbols is slower than ;;setting integers. ;; ;;Your offering is the almost the same a Luis' except that yours doesn't ;;provide for validating the input or for multiple-character delimiters. ;; ;;While Marc'Antonio's method is the fastest, I've grown a liking to the ;;multiple-character delimiter, which his will not handle. ;; ;;Taking the best from Luis and Marc'Antonio, plus acknowledgments to Eric ;;Schneider, I now offer the following... (defun Str2List (str pat / i j n lst) (cond ((/= (type str)(type pat) 'STR)) ((= str pat)'("")) (T (setq i 0 n (strlen pat)) (while (setq j (vl-string-search pat str i)) (setq lst (cons (substr str (1+ i)(- j i)) lst) i (+ j n) ) ) (reverse (cons (substr str (1+ i)) lst)) ) ) ) ;; It's not as fast as Marc'Antonio's, but pretty close.