In Lua, the string.len()
function is used to get the size of a string.
Here is a visual representation of this function:
string.len(str)
In this example, we will return the size of our string.
mystr = "Hello, Educative!"print(string.len(mystr))
17