有一个方便的标准功能alpha-char-p,可以满足您的要求.
CL-USER(1): (alpha-char-p #\a)
T
CL-USER(2): (alpha-char-p #\?)
T
CL-USER(3): (alpha-char-p #\?)
T
CL-USER(4): (alpha-char-p #\0)
NIL
CL-USER(5): (alpha-char-p #\.)
NIL
Run Code Online (Sandbox Code Playgroud)
您可以将它与every以下内容结合使用:
CL-USER(7): (every #'alpha-char-p "word")
T
CL-USER(8): (every #'alpha-char-p "nonword7")
NIL
CL-USER(9): (every #'alpha-char-p "non-alpha-word")
NIL
CL-USER(10): (every #'alpha-char-p "???")
T
Run Code Online (Sandbox Code Playgroud)