Hello people. Iv'e been reading the scripting book on Roblox Wiki and came across a new thing that I didn't know before: string.len
string.len returns how much a characters a variable has.
HeyDude = "Hey Dude, Wassup!" print(string.len(HeyDude))
I wanted to know what is useful about it? What can I use it for.
Also I wanted to know what these are useful for as well:
string.lower
string.upper
-PhotonLightning
string.len("Hey Dude, Wassup!") --> 17 string.lower("Hey Dude, Wassup!") --> hey dude, wassup! string.upper("Hey Dude, Wassup!") --> HEY DUDE, WASSUP!
It can be useful if you want to put a character limit into a custom chat function. string.lower returns all characters of the string in lower case, and the same goes for string.upper, except it returns them in upper case. This could be useful if you are trying to scan for certain words, such as swear words, but don't want to worry about the characterisation. Hope this helped :)