818 posts
Posted 23 October 2012 - 04:39 PM
Hey guys, just wondering, is there a way to get the number of digits in a number, so for example, I enter 5678 and use it in this function so it will return 4. short of, ofcourse, writing and getting CursorPos
231 posts
Posted 23 October 2012 - 05:14 PM
You can use string.len on numbers.
string.len(5678) -- Returns 4
2217 posts
Location
3232235883
Posted 23 October 2012 - 05:16 PM
or just use the # operator
val=5678
return #val
231 posts
Posted 23 October 2012 - 05:21 PM
or just use the # operator
val=5678
return #val
Doesn't work. I just tested it. Attempt to get length of number
818 posts
Posted 23 October 2012 - 05:25 PM
OK, thanks