新手求助
下面这句不明白意思(setq bstr (= (strcase strkind) (strcase "Good")))
是不是后面相等就赋值给bstr?
如何再加个条件,或等于strcase "very Good"
(setq bstr (= (strcase strkind) (strcase "Good")))
等价于
(setq bstr (= (strcase strkind) "GOOD"))
判断 strkind 是否等于 "GOOD",(忽略大小写)
sbstr 返回bool结果只有 T nil 黄翔 发表于 2024-8-14 14:02
(setq bstr (= (strcase strkind) (strcase "Good")))
等价于
(setq bstr (= (strcase strkind) "GOOD")) ...
非常感谢,能否改写一下,即strkind 是否等于GOOD或者等于VERYGOOD?满足一项返回T (setq bstr (or (= (strcase strkind) "GOOD") (= (strcase strkind) "VERYGOOD")))
或
(setq bstr (wcmatch (strcase strkind) "GOOD,VERYGOOD"))
(setq bstr(or(=(strcase strkind)"GOOD")(=(strcase strkind)"VERYGOOD"))) 谢谢各位! (setq bstr (and strkind(member (strcase strkind) '("GOOD" "VERYGOOD")))) 最简写法了,用在判断合适
页:
[1]