我通过连接部分路径和目录名称手动构建Elisp中的路径字符串.不幸的是,有时路径以斜线结束,有时不是.因此,我需要在必要时在连接目录名之前插入斜杠,但不是这样.这样做的好方法是什么?
lisp emacs elisp
是否有一个函数检查字符串是否以某个子字符串结尾?Python有endswith:
endswith
>>> "victory".endswith("tory") True
string emacs elisp substring string-matching
elisp ×2
emacs ×2
lisp ×1
string ×1
string-matching ×1
substring ×1