- ;字符串以指定字符分隔成字符串表
- ;(by-str-to-lst "Aa bb cc dd ee" " ")>>("Aa" "bb" "cc" "dd" "ee")
- (defun by-str-to-lst(str zt / n nstr)
- (while (setq n (vl-string-search zt str))
- (setq nstr (cons (substr str 1 n) nstr)
- str (substr str (+ 1 (strlen zt) n))
- )
- )
- (reverse (cons str nstr))
- )
|