ToUpper and ToLower (String functions): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
Line 30: Line 30:
===See also===                             
===See also===                             
[[List of Intrinsic String Methods]]
[[List of Intrinsic String Methods]]
[[Category:Intrinsic Methods]]
[[Category:Intrinsic String Methods]]

Revision as of 22:31, 27 August 2010

The ToUpper and ToLower functions return the alphabetic characters in the method object string as all-uppercase or all-lowercase characters, respectively. Non-alphabetic characters are returned as is, and the input string undergoes no other change.

These functions are available as of Sirius Mods version 7.3.

ToUpper and ToLower syntax

  %outStr = string:ToUpper                                                        
                                                                                  
  %outStr = string:ToLower                                                        

Syntax Terms

%outStr
A string or Longstring to receive the all-uppercase or all-lowercase characters converted from the input string.
string
The input string or Longstring.

Examples

Example ToUpper and ToLower statements follow:

    . . .                                                                         
   %s is longstring                                                               
   %s = 'A c E g ?4lN ,8, t v { Z'                                                
   printText {~} = '{%s:toUpper}'                         
   printText {~} = '{%s:toLower}'                                                 
    . . .                                                                         
                                                                                  

The results are:

   %s:toUpper = A C E G ?4LN ,8, T V { Z 
   %s:toLower = a c e g ?4ln ,8, t v { z 
                                         

See also

List of Intrinsic String Methods