The strLib.lowerCaseChar() system function returns a copy of a character-type value and sets all the uppercase characters in that copy to lowercase. Numeric values are not affected.
The function retains trailing blanks from the value of an input. If you want to strip trailing blanks from an input value that is of a type other than String, use the strLib.lowerCase() function instead.
To convert lowercase values to uppercase, use the strLib.upperCaseChar() or strLib.upperCase() function.
strLib.lowerCaseChar(
text CHAR? in)
returns (result CHAR?)
function main()
// each of the literals has 8 characters
myChar CHAR(5) = "ABC ";
myUnicode UNICODE(5) = "ABC ";
myString String = "ABC ";
sysLib.writeStdout(StrLib.lowerCase(myChar) +
"is, for lowerCase type Char");
sysLib.writeStdout(StrLib.lowerCaseChar(myChar) +
"is, for lowerCaseChar type Char");
sysLib.writeStdout(StrLib.lowerCase(myUnicode) +
"is, for lowerCase type Unicode");
sysLib.writeStdout(StrLib.lowerCaseChar(myUnicode) +
"is, for lowerCaseChar type Unicode");
sysLib.writeStdout(StrLib.lowerCase(myString) +
"is, for lowerCase type String");
sysLib.writeStdout(StrLib.lowerCaseChar(myString) +
"is, for lowerCaseChar type String");
end
abcis, for lowerCase type Char
abc is, for lowerCaseChar type Char
abcis, for lowerCase type Unicode
abc is, for lowerCaseChar type Unicode
abc is, for lowerCase type String
abc is, for lowerCaseChar type String
| Platform | Issue |
|---|---|
| COBOL generation | The strLib.lowerCaseChar() function has no effect on double-byte characters. |