Reverse (String function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (1 revision)
Line 1: Line 1:
{{Template:String:Reverse subtitle}}
{{Template:String:Reverse subtitle}}


This [[Intrinsic classes|intrinsic]] function returns the characters in the      
This [[Intrinsic classes|intrinsic]] function returns the characters in the
method object string in right-to-left order.                                      
method object string in right-to-left order.
                                                                                 
 
The <var>Reverse</var> function is available as of version 7.3 of the [[Sirius Mods]].      
The <var>Reverse</var> function is available as of version 7.3 of the [[Sirius Mods]].
==Syntax==
==Syntax==
{{Template:String:Reverse syntax}}
{{Template:String:Reverse syntax}}
===Syntax terms===
===Syntax terms===
<dl>                                                                              
<dl>
<dt>%outStr                                                                      
<dt>%outStr
<dd>A string or Longstring to receive the re-ordered                              
<dd>A string or Longstring to receive the re-ordered
characters from the input string.                                                
characters from the input string.
<dt>string                                                                        
<dt>string
<dd>The input string or Longstring.                                              
<dd>The input string or Longstring.
                                                                                 
 
</dl>                                                                            
</dl>
==Examples==
==Examples==
                                                                                 
 
A <var>Reverse</var> method example follows:                                                
A <var>Reverse</var> method example follows:
     . . .                                                                        
     . . .
     %s is longstring                                                              
     %s is longstring
     %s = 'A c E g ?4lN'                                                          
     %s = 'A c E g ?4lN'
     [[PrintText statement|printText]] {~} = '{%s:reverse}'                        
     [[PrintText statement|printText]] {~} = '{%s:reverse}'
     . . .                                                                        
     . . .
will display:                                                                    
will display:
     %s:reverse = Nl4? g E c A
     %s:reverse = Nl4? g E c A


===See also===                                                                    
===See also===
[[List of intrinsic String methods]]
[[List of intrinsic String methods]]

Revision as of 15:48, 19 January 2011

Return string characters in right-to-left order (String class)


This intrinsic function returns the characters in the method object string in right-to-left order.

The Reverse function is available as of version 7.3 of the Sirius Mods.

Syntax

%outString = string:Reverse

Syntax terms

%outStr
A string or Longstring to receive the re-ordered characters from the input string.
string
The input string or Longstring.

Examples

A Reverse method example follows:

    . . .
   %s is longstring
   %s = 'A c E g ?4lN'
   printText {~} = '{%s:reverse}'
    . . .

will display:

   %s:reverse = Nl4? g E c A

See also

List of intrinsic String methods