poking around near the end of a string

Klaus major-k klaus at major-k.de
Wed May 10 16:31:56 CEST 2017


Hi Richmond,

> Am 10.05.2017 um 16:18 schrieb Richmond via use-livecode <use-livecode at lists.runrev.com>:
> 
> Suppose I have a string a bit like this:
> 
> "and then the gigantic monster bit my mother on the nose $W"
> and I want to check that that string ends with "$W" . . .
> I tried this (pseudo code):
> *if the ((last char) & (last char -1)) of MNOSE = "$W"*
> and it did not work.

this does work:
...
if MNOSE ends with "$W" then
...
if char -2 to -1 of MNOSE = "$W" then
...

> Richmond.

Best

Klaus

--
Klaus Major
http://www.major-k.de
klaus at major-k.de




More information about the use-livecode mailing list