Converts a string to lowercase, uppercase or title case.
NewString := StrLower(String) NewString := StrUpper(String) NewString := StrTitle(String)
Type: String
The string to convert.
Type: String
These functions return the newly converted version of the specified string.
To detect whether a character or string is entirely uppercase or lowercase, use the IsUpper, IsLower or RegExMatch function. For example:
var := "abc" if isUpper(var) MsgBox "var is empty or contains only uppercase characters." if isLower(var) MsgBox "var is empty or contains only lowercase characters." if RegExMatch(var, "^[a-z]+$") MsgBox "var is not empty and contains only lowercase ASCII characters." if !RegExMatch(var, "[A-Z]") MsgBox "var does not contain any uppercase ASCII characters."
Format can also be used for case conversions, as shown below:
MsgBox Format("{:U}, {:L} and {:T}", "upper", "LOWER", "title")
InStr, SubStr, StrLen, StrReplace
Converts the string to lowercase and stores "this is a test." in String1.
String1 := "This is a test." String1 := StrLower(String1) ; i.e. output can be the same as input.