(DEFUN LN-STR2LSTSPR( STR SUB / LST N )
(while (and (setq N (VL-STRING-SEARCH SUB STR )) )
(setq LST (CONS (SUBSTR STR 1 N ) LST ))
(setq STR (SUBSTR STR (+ N (STRLEN SUB ) 1 ) ))
)
(VL-REMOVE "" (REVERSE (CONS STR LST ) ) )
)
(DEFUN str_Clipboard2List (/ A ans B C D LST parse_tmp)
(setq A (LN-GET-CLIPTEXT ))
;(alert "")
(setq B (LN-STR2LSTSPR A "\r\n" )) ;根据换行符对剪贴板文本进行分行。
(setq Ans nil)
(foreach X B ;根据分列符,将每行中的内容进行分列。
(setq parse_tmp (LN-STR2LSTSPR X "\t" ))
(setq Ans (cons parse_tmp Ans))
)
(setq Ans(reverse Ans))
)
;;--------------------