How do I get the length of a string?

Q

How do I get the length of a string?

A

With the :len() operator and preceding string variable

Example code:

string_a = “Hello“
len = string_a:len()
-- will result in value 5 for variable len