Titlecase

From Xojo Documentation

Method

Returns the string passed to it with all alphabetic characters in Titlecase.

Syntax

result=Titlecase(value)
OR
result=stringVariable.Titlecase

Part Type Description
result String A copy of the original string with all characters converted to their titlecase equivalent.
value String The original string.
stringVariable String Any variable of type String.

Notes

Converts all characters in a string to lowercase characters and then converts the first character of each word to uppercase. Numbers are not affected.

Examples

The example below converts the values passed to Titlecase

Dim s As String
s = Titlecase("tHe Quick fOX") // returns "The Quick Fox"
s = Titlecase("THE LAZY DOG") // returns "The Lazy Dog"

s = "THE LAZY DOG"
s = s.Titlecase // returns "The Lazy Dog"

See Also

Lowercase, Uppercase functions.