本帖最后由 819534890 于 2016-1-7 01:34 编辑
 - (defun list-to-string(lst / x l)
- (foreach x lst
- (setq l (cons (vl-string-left-trim "(" (vl-string-right-trim ")" (vl-princ-to-string x))) l)))
- (reverse l)
- )
- ; _$ (setq aaa '((王超军 26) (张云 13) (李四 35) (赵富贵 72) (张伟 36)) )
- ; ((王超军 26) (张云 13) (李四 35) (赵富贵 72) (张伟 36))
- ; _$ (LIST-TO-STRING aaa)
- ; ("王超军 26" "张云 13" "李四 35" "赵富贵 72" "张伟 36")
|