string.lower

From ComputerCraft
Jump to: navigation, search

string.lower
Function
Syntax
string.lower()
Colon notation: str:lower()

Returns string
API string
Source Lua (source)

Return a modified version of str where all uppercase characters have been converted to lowercase. Special characters and numbers are not affected.

ExampleExamplePrint the user's input in all lowercase.
Read a line from the user, then print string in all lowercase.
Code
print(string.lower(read()))
Output Depends on what the user wrote. For instance, if they were to enter Hello World, the string printed would be hello world.