TCase Function

Converts a string to "title" case. The first character of each word is converted to uppercase, while the remaining letter characters are converted to lowercase. Non-letter characters remain unchanged.

TCase (string)

Parameter

String  -  (Input, expression, Required)

Specifies the string to convert. If a numeric value is passed, it is first converted into a string. If a non-string value is passed, the result is Error. If Null is passed, Null is returned.

Return Value

The specified string in "title" case form.

Note

If the word contains characters of mixed case, or if the word contains all capitals plus non-letter character, then the existing case is left unchanged.

This function is not supported in VB and JScript scripts.

Examples

TCase ("abc")

Returns "Abc"

TCase ("ABC")

Returns "Abc"

TCase ("an as/400")

Returns "An As/400"

TCase ("AN AS/400")

Returns "An AS/400"

TCase ("aN aS/400")

Returns "aN aS/400"

TCase (123)

Returns "123"

TCase (Null)

Return Null

TCase (Error)

Returns Error

TIP:

Functions are specifically for use in the Macro Editor. Refer to Microsoft's official VB and JScript documentation for scripting equivalents.

See also

Functions | Asc function | Chr function | CSet function | Format function | InStr function | LCase function | Left function | Len function | LSet function | LTrim function | Mid function | Replace function | Right function | RSet function | RTrim function | Space function | String function | TCase function | Trim function | UBound function | UCase function


© 2004-2021 looksoftware. All rights reserved.