upper#
Purpose#
Converts a string, matrix of character data, or string array to uppercase.
Format#
- y = upper(x)#
- Parameters:
x (string or NxK matrix, or string array) – the character data to be converted to uppercase.
- Returns:
y (string or NxK matrix or string array) – containing the uppercase equivalent of the data in x.
Examples#
// Create a lowercase string
x = "uppercase";
// Convert the string to upper case
y = upper(x);
// Adding the '$' tells GAUSS to treat the data as character
// data
print $y;
This code produces:
UPPERCASE
Remarks#
If x is a numeric matrix, y will contain garbage. No error message will be generated since GAUSS does not distinguish between numeric and character data in matrices.
See also
Functions lower()