Case manipulation

Lua provides two functions for case manipulation: upper and lower. As you would expect, these functions transform a string to be upper case or lower case. Like all string functions, these functions are written to work using the colon notation. The code here demonstrates how these functions are used:

local sentence = "A rose is a Rose is a ROSE"
print (sentence)

print(string.upper(sentence))
print(string.lower(sentence))

-- OR, use : notation
print(sentence:upper())
print(sentence:lower())
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.26.108