> > (de sub? (Pat Str) > (and > (match (cons '@ (conc (chop Pat) '@)) (chop Str)) > Str ) ) > > or > > (de sub? (Pat Str) > (setq Pat (chop Pat)) > (and > (seek > '((L) (head Pat L)) > (chop Str) ) > Str ) ) > > (is there a better (shorter, more elegant) way?) >
If it's about checking single characters, why not just:
(de sub? (Ch Str)
(member Ch (chop Str) )
so rewriting this:
(or (= X ",") (= X ".") (= X "?"))
as
(sub? X ",.?")
would work just fine.
