Garry's Mod Wiki

string.upper

  string string.upper( string str )

Description

Changes any lower-case letters in a string to upper-case letters.

This function doesn't work on special non-English UTF-8 characters.

Arguments

1 string str
The string to convert.

Returns

1 string
A string representing the value of a string converted to upper-case.

Example

Demonstrates the use of this function.

print( string.upper( "ABCDEFG" ) ) print( string.upper( "AbCdefG" ) ) print( string.upper( "abcdefg" ) ) print( string.upper( "1234567890" ) )
Output:
ABCDEFG ABCDEFG ABCDEFG 1234567890