Previous Topic: WEEKDAYNext Topic: YESTERDAY


WORDCAP

Purpose

Returns the string that results when the first letter of each word in the specified source string is capitalized and all other characters in the string are converted to lowercase.

Syntax

►►─── WORDCAP ( string ) ─────────────────────────────────────────────────────►◄

Syntax Rule

string

Specifies the string to be converted.

String can be:

The first letter in each word is capitalized and all other characters are converted to lowercase.

Example

In the following example, the word cap function is used on the employee's name:

Initial value:
    EMP-LNAME: 'O'HEARN            '
Statement:
    MOVE WORDCAP(EMP-LNAME) TO WK-STRING.
Returned string:
    'O'Hearn            '