STRUPCASE Function
Converts a copy of the input string to uppercase letters.
Usage
result = STRUPCASE(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 section Free Format Output in Chapter 8 of the PV‑WAVE Programmer’s Guide.)
Returned Value
result—A copy of string converted to uppercase 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 lowercase characters are modified by STRUPCASE; uppercase and nonalphabetic characters are copied without change.
Example
This example uses STRUPCASE to convert lowercase characters to uppercase in several different strings.
; Create string with a mix of uppercase and lowercase characters.
; Convert the string in a to uppercase and display the result.
a = 'A StRInG oF miXeD caSE'
PRINT, STRUPCASE(a)
; PV-WAVE prints: A STRING OF MIXED CASE
b = 45
INFO, STRUPCASE(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 it to uppercase.
PM, STRUPCASE(c)
; PV-WAVE prints the following:
; STRING 0
; STRING 1
; STRING 2
See Also
Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.