LCWORD2: Converting a String to Mixed-Case

How to:

The LCWORD2 function converts the letters in a character string to mixed-case by converting the first letter of each word to uppercase and converting every other letter to lowercase. In addition, a double quotation mark or a space indicates that the next letter should be converted to uppercase.

For example, "SMITH" would be changed to "Smith" and "JACK S" would be changed to "Jack S".

Syntax: How to Convert a Character String to Mixed-Case

LCWORD2(length, string, output)

where:

length

Integer

Is the length, in characters, of the character string or field to be converted, or a field that contains the length.

string

Alphanumeric

Is the character string to be converted, or a temporary field that contains the string.

output

Alphanumeric

The length must be greater than or equal to length.

Example: Converting a Character String to Mixed-Case

LCWORD2 converts the string O'CONNOR’s to mixed-case:

The value returned is O’Connor’s.

WebFOCUS

Feedback