This content has been marked as final. Show 4 replies
The ASCII code for each lower case is 32 away from it's equivalent upper
case letter. For example the code for "a" is 97 and the code for "A" is 65.
num = charToNum ("a")
num = num - 32
newChar = charToNum (num)
Of course, I would create a function that would loop through a word to
convert it. There's a lot of functionality you could add into a funtion so
you'd only have to write it once and could use it generically.
"Mitch Wallace" <email@example.com> wrote in message
> How do you change the case of a text string to upper or lower with lingo?
> Sorry if I'm missing something obvious in the help panel but I just seem
> to be going in circles looking for it.
make this as a JS moviescript...
Once you have that in, then you can use these functions from Lingo:
put stringToLower("HI THere123")
-- "hi there123"
put stringToUpper("HI THere123")
-- "HI THERE123"
Thanks guys. I had just assumed that Lingo would would have some simple single word commands for this, like some of the other programs I use. Last night figured out the ASCII code shift amount and ended up doing exactly what you guys suggested here and wrote a couple of little functions to switch the case of the text.
If you use lingo you can do:
on toLowerCase inString
p = newObject("String", inString)
Which uses a "flash" object... from what i've read in another place... (i wonder what other kinds of "functionality" on can piggyback from flash/objects this way hehehe)