len(right(number, 3))
Cubist at aol.com
Cubist at aol.com
Wed Jan 26 02:00:23 EST 2005
sez ps1 at softseven.org:
>How is this statement wrote in Rev,
>
>len(right(number, 3)
>
>this in VB will take the number ex:
>
>number = "12345678"
>
>and cut it down to
>
>number = "678"
>
>starting at the right and give you the first 3 numbers.
>
>I need to do this in Rev.
>
>
>I searched "len" and got
>
>put char (length(it) - 3) to (length(it)) of it into myExtension
>
>but don't understand what it means.
Fortunately, it's simpler than that -- you don't need to worry about the
length() function at all! CHar -1 of a string is *always* its *last* character;
char -2 of a string, it's next-to-last character; and so on. Like so:
put char -3 to -1 of it into myExtension
More information about the use-livecode
mailing list