FutureBasic Logo

<<    Index    >> FutureBasic 5

ucase$ ucase$$   function



Syntax:
upperCaseString$ = ucase$(string$)
upperCaseContainer$$ = ucase$$(container$$)


Description:
This function returns a copy of string$ or container$$ with all its lower-case letters converted to upper-case. This also applies to letters with diacritical marks; so for example the string "mágüey" will be converted to "MÁGÜEY".
ucase$ is useful when you want to compare two strings for equality without regard to their letter case. For example, suppose you want all of the following strings to be treated in the same way:
STAZ
Staz
staz
sTAz

Any pair from the above set will be considered to "match" if they're compared as follows:
if ucase$(str1$) = ucase$(str2$) then print "Names match."
The comparison of containers requires the use of an additional function. See fn FBcompareContainers for more information.

Note:
To test whether one string is greater than or less than another without regard to letter case, an alternative method is to use the string comparison operators ">>" and "<<". See Appendix D - Numeric Expressions, for more information.

See Also:
fn FBcompareContainers; Appendix F - ASCII Character Codes