Determine last character of a variable

Phil Davis revdev at
Wed Aug 26 13:44:25 EDT 2009

Try "char 1 to -1 of tdata".

char -1 is the last char
char -2 is the next-to-last char
and so on.

Phil Davis

Warren Kuhl wrote:
> This is probably a very stupid question..
> I am trying to extract a substring from a variable and am unsure how to
> determine the last character...
> I tried...
> put char 1 to last character of tdata into tsubstring
> ...but this fails.
> Thanks for any help!
> Warren
> _______________________________________________
> use-revolution mailing list
> use-revolution at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

Phil Davis

PDS Labs
Professional Software Development

More information about the Use-livecode mailing list