用法
评论
建议
取 消
确 定
(defun string:sort-by-number (lst-str) "按数字排序字符串\n在夹杂数字时,如果数字前后的字符串相同,按数字大小排序" "排序后的字符串表" "(string:sort-by-number '(\"a5\"\n \"a1\"\n \"a8\"\n \"b2\"\n \"b1\"\n \"a110\"\n \"a13\"))" (vl-sort lst-str (quote (lambda (x y) (apply (quote or) (mapcar (quote (lambda (a b) (cond ((and (string:intp a) (string:intp b)) (< (atoi a) (atoi b))) ((and (string:realp a) (string:realp b)) (< (atof a) (atof b))) ((and (string:hannumberp a) (string:hannumberp b)) (< (string:hannumber2number a) (string:hannumber2number b))) (t (< a b))))) (string:auto-split x) (string:auto-split y)))))))
函数库使用说明
应用包
技术支持
统计信息
函数库规模: 767 个
函数库类别: 53 种
上传记录
刷新