What is the simplest way possible to do this?
EDIT: Got it. It would be...
string.len(string)
Edited by Micro Macro, 19 August 2014 - 05:22 AM.
Posted 19 August 2014 - 05:07 AM
string.len(string)
Edited by Micro Macro, 19 August 2014 - 05:22 AM.
Posted 19 August 2014 - 05:23 AM
local string = "random string" print(#string) --> 13There are a couple of easy ways to get the length of a string, one being what i just did, and the other being
local lengths = string.len("somestring")
print(lengths) --> 10
string.len() is basic lua string manipulation, however i believe that having 0's in your string will not count off towards the end goal (this was read from the lua 5.1 manual). However using the length modifier, #, does include 0'sEdited by Dragon53535, 19 August 2014 - 05:28 AM.
Posted 19 August 2014 - 08:36 AM
Dragon53535, on 19 August 2014 - 05:23 AM, said:
Posted 19 August 2014 - 04:33 PM
Posted 20 August 2014 - 02:23 AM
Dragon53535, on 19 August 2014 - 04:33 PM, said:
Edited by theoriginalbit, 20 August 2014 - 02:23 AM.
Posted 20 August 2014 - 02:35 AM
Quote
0 members, 2 guests, 0 anonymous users