我正在尝试编写一个函数来验证一个字符串是否包含在 Lisp 中的另一个字符串中,但我不能
例如 :
(string-include 'abd 'abbbe) => nil
(string-include 'ghf 'dghfd) => ghf
Run Code Online (Sandbox Code Playgroud)
这是我的功能:
(defun string-include (string1 string2)
(cond
((not string1) 0)
((not string2) 0)
((.... (string1) (string2)) (string1 (string-include string1 (cdr string2))))
((string-include string1 (cdr string2)) ) )
Run Code Online (Sandbox Code Playgroud)