StringLower / StringUpper

Converts a string to lowercase or uppercase.

StringLower, OutputVar, InputVar , T
StringUpper, OutputVar, InputVar , T



The name of the output variable in which to store newly converted string.


The name of the input variable whose contents will be read from. Do not enclose the name in percent signs unless you want the contents of the variable to be used as the name.


If this parameter is the letter T, the string will be converted to title case. For example, "GONE with the WIND" would become "Gone With The Wind".


To detect whether a character or string is entirely uppercase or lowercase, use "if var is [not] upper/lower".

For this and all other commands, OutputVar is allowed to be the same variable as an InputVar.

[v1.1.20+]: Format() can also be used for case conversions, as shown below:

MsgBox % Format("{:U}, {:L} and {:T}", "upper", "LOWER", "title")

Format(), IfInString, StringGetPos, StringMid, StringTrimLeft, StringTrimRight, StringLeft, StringRight, StringLen, StrReplace(), StringReplace


Converts to lower case and stores the string "this is a test." in String1.

String1 := "This is a test."
StringLower, String1, String1  ; i.e. output can be the same as input.

Converts to upper case and stores the string "THIS IS A TEST." in String2.

String2 := "This is a test."
StringUpper, String2, String2

Converts to title case and stores the string "This Is A Test." in String3. Note that the same effect would be achieved by using StringLower instead of StringUpper.

String3 := "This is a test."
StringUpper, String3, String3, T