Function Upper() Foundation
Converts lower case letters in a character string to upper case.
Upper( <cString> ) --> cUpperCase
The return value of Upper() is a copy of <cString> in which all lower case letters are replaced with upper case letters.
The character function Upper() converts all lower case letters in a character string to upper case. It is the reverse of the function Lower() which converts character strings to lower case.
The letters "a" to "z" are converted by Upper() to "A" to "Z". To convert language-specific special characters like "ä", "ö" and "ü" to upper case letters, the appropriate collation table must be selected.
The result depends on SET COLLATION and can be manipulated by LocaleConfigure() .
// The example shows various results of the function Upper()
PROCEDURE Main
? Upper("Xbase++") // result: XBASE++
? "XBASE++" == Upper("Xbase++") // result: .T.
RETURN
// In the example, an index is created independent of the
// case of the text.
PROCEDURE Main
LOCAL cName:= Space(20)
USE Address NEW EXCLUSIVE
INDEX ON Upper(Name) TO Address1
@ 10,10 SAY "Name:" GET cName
READ
SEEK Upper(cName)
? IIf( Found(), "Found", "Name does not exist" )
USE
RETURN
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.