STRLOWCASE Function

Converts a copy of the input string to lowercase letters.

Usage

result = STRLOWCASE(string)

Input Parameters

string—The string to be converted.

If not of type string, string is converted to string using the default formatting rules of PV‑WAVE. (These rules are described in the PV‑WAVE Programmer’s Guide.)

Returned Value

result—A copy of string converted to lowercase letters. If string is an array, the result is an array with the same structure, with each element containing the substring of the corresponding string element.

Keywords

None.

Discussion

Only uppercase characters are modified by STRLOWCASE; lowercase and nonalphabetic characters are copied without change.

Example

This example uses STRLOWCASE to convert uppercase characters to lowercase in several different strings.

; Create string with a mix of uppercase and lowercase characters.
a = 'A StRInG OF mIXeD CaSe'
; Convert the string in a to lowercase and display the result.
PRINT, STRLOWCASE(a)
; PV-WAVE prints: a string of mixed case
; Create an integer scalar variable.
b = 45
; Examine the result of STRLOWCASE applied to b. Note that b is
; converted to a string.
INFO, STRLOWCASE(b) 
; PV-WAVE prints: <Expression>     STRING    = '      45'
; Create a three-element string vector.
c = STRARR(3)
; Assign a string with a mix of uppercase and lowercase characters
; to each element of c.
c(0) = 'StrInG 0'
c(1) = 'sTrINg 1'
c(2) = 'StrinG 2'
; Display vector of strings of c after converting them 
; to lowercase. Use TRANSPOSE to view the vector as a column.
PRINT, TRANSPOSE(STRLOWCASE(c))
; PV-WAVE prints the following: 
; string 0
; string 1
; string 2

See Also

MESSAGE, PRINT, STRING, STRUPCASE, XYOUTS