string.upper

From ComputerCraft
Jump to: navigation, search

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

Returns string
API string
Source Lua (source)

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

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