string.upper(str)

Converts all lowercase characters in a string into uppercase characters.

This function will try to convert the string, even for UTF8 characters.

Parameters

str

The string to be used to produce a string with uppercase characters.

Return value

Returns a new string with the same content but uppercase characters.

Example

local console = require "console" print('Enter your name : ') local name = console.readln(); if name == name:upper() then print("Please don't shout !") else print('Hi '..name..' !') end