[SOLVED] How to trim a string

How would I print the first 5 characters of a string in LUA? I've been poring over the http://www.lua.org/pil stuff for a while now and cant come up with it. I KNOW I've done it before, but I'm on my first cup of coffee.

Any clues or hints would be appreciated!!!

Best,
Mario

[UPDATE] Solved!!

print(string.sub(tempString,1,15)) -- Will print the first part of 'tempString' from 1 to the 15th character.

Stupid strings!! BLAH!

Thank for sharing!

Regards,

Anything I can do to help out others, you bet!! :)

-Mario

Hey Mario,

Thanks! =]

PS: When I get to be able to "help" others as you do and said above, WOW, I`ll be really happy as well! Cannot wait for this time...oh God...:)

See yah mate,
Rodrigo.

views:1650 update:2011/10/19 14:58:09
corona forums © 2003-2011