Code: Select all
(member "" "newLISP") ? "newLISP")
Code: Select all
(member "" "newLISP") ? "newLISP")
Code: Select all
> (member "f" "oo")
nil
> (member "f" (append "f" "oo"))
"foo"
> (member "" (append "" "oo"))
"oo"
Code: Select all
(member "" some-string)
Hi William. Yes, this is what I understood the manual to mean, but I'm objecting to it on philosphical grounds! (Not that I'm qualified to, being neither a philosopher or any sort of programmer... :-)William James wrote: Every string contains the empty string as a substring, sois always true.Code: Select all
(member "" some-string)
Code: Select all
> (member "" "this is a string")
"this is a string"
> (member '() '("this" "is" "a" "list"))
nil
> (find "" "this is a string")
nil
> (find '() '("this" "is" "a" "list"))
nil
Code: Select all
(slice str (find key str 0))
Code: Select all
(member "" "abcd") => "abcd" => true
(find "" "abc") => nil
(find "" "abc" 0) => 0 => true
(regex "" "abc") => ("" 0 0) => true
Code: Select all
(starts-with "abc" "") => true
(ends-with "abc" "") => true
(a quote from a musician to keep m i c h a e l happy)newLISP: making the complicated simple
:-)cormullion wrote:(a quote from a musician to keep m i c h a e l happy)