How to: |
The LCWORD and LCWORD2 functions convert the letters in a character string to mixed-case. These functions convert character strings in the following way:
If LCWORD encounters a number in the character string, it treats it as an uppercase character and continues to convert the following alphabetic characters to lowercase.
To use these functions, you must import the function library MNTUWS. For information on importing this library, see Accessing and Calling a Function.
There is also an LCWORD function available for both the reporting and Maintain languages. For information on this function, see Character Functions.
{LCWORD|LCWORD2}(string)
where:
Alphanumeric
Is the character string to be converted, or a temporary field that contains the string.
LCWORD and LCWORD2 convert the string O'CONNOR to mixed-case:
MAINTAIN FILE CAR MODULE IMPORT (MNTUWS) COMPUTE MYVAL1/A10="O'CONNOR"; COMPUTE LC1/A10 = LCWORD(MYVAL1); COMPUTE LC2/A10 = LCWORD2(MYVAL1); TYPE "<<MYVAL1 <<LC1 <<LC2" END
The output is:
MYVAL1 LC1 LC2 ------ --- --- O'CONNOR O'Connor O'connor