Lua Programming/case sensitivity

From Wikibooks, open books for an open world
Jump to navigation Jump to search

The lua interpreter is case sensitive. This means that identifier names containing lowercase letters will be treated as being different and separate from those containing uppercase letters:

-- These variables are all different
dog = "Benjamin"
Dog = "Samba"
DOG = "Bernie"
print ("The dogs are named " .. dog .. ", " .. Dog .. ", and " .. DOG)

Converting Strings[edit | edit source]

The lua interpreter provides the following functions for converting strings to uppercase or to lowercase: