Titlecase

From Xojo Documentation

Method

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

Syntax

result=sourceVariable.Titlecase

Part Type Description
result String A copy of the original string with all characters converted to their titlecase equivalent.
sourceVariable String The original 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

Var result As String
Var source As String = "tHe Quick fOX"
result = source.Titlecase // returns "The Quick Fox"
source = "THE LAZY DOG"
result = source.Titlecase // returns "The Lazy Dog"

See Also

Lowercase, Uppercase functions.