函数-判断表/字符串共同后缀长
;vl-string-mismatch判断字符串共同前缀共同后缀长的函数没有,以下参考
;lstmatch-right判断字符串共同后缀长
(lstmatch-right
(vl-string->list"dfg外围几BG节课")
(vl-string->list"dfg外围几?BG节课")
)
;表最后相同长度
;(lstmatch-right '(1 2 33) '(1 2 2 33))
(defun lstmatch-right(l1 l2 / n a b)
(setq n 0 l1(reverse l1) l2(reverse l2))
(while(and
(setq a(car l1))(setq b(car l2))(equal a b)
(setq n(1+ n)l1(cdr l1)l2(cdr l2))
))n
)
页:
[1]