Reverse (String function): Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
m (match syntax diagram to revised template; fix tags.) |
||
Line 1: | Line 1: | ||
{{Template:String:Reverse subtitle}} | {{Template:String:Reverse subtitle}} | ||
The <var>Reverse</var> [[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. | |||
==Syntax== | ==Syntax== | ||
{{Template:String:Reverse syntax}} | {{Template:String:Reverse syntax}} | ||
===Syntax terms=== | ===Syntax terms=== | ||
< | <table class="syntaxTable"> | ||
< | <tr><th>%outString</th> | ||
< | <td>A string or to receive the re-ordered characters from the input method object<var class="term">string</var>.</td></tr> | ||
characters from the input string. | <tr><th>string</th> | ||
< | <td>The input <var class="term">string</var> to which the method is applied.</td></tr> | ||
< | </table> | ||
==Usage notes== | |||
<ul><li>The <var>Reverse</var> function is available as of <var class="product">[[Sirius Mods]]</var> version 7.3.</ul> | |||
==Examples== | ==Examples== | ||
<ol><li>A <var>Reverse</var> method example follows: | |||
A <var>Reverse</var> method example follows: | |||
<p class="code">. . . | <p class="code">. . . | ||
%s is longstring | %s is longstring | ||
%s = 'A c E g ?4lN' | %s = 'A c E g ?4lN' | ||
printText {~} = '{%s:reverse}' | |||
. . . | . . . | ||
</p> | </p> | ||
will display: | will display: | ||
<p class="code">%s:reverse = Nl4? g E c A | <p class="code">%s:reverse = Nl4? g E c A | ||
</p></ol> | |||
==See also== | ==See also== | ||
<ul><li>For details of the <var>printtext</var> statement, please see <var>[[Intrinsic classes#printtext|printText]]</var></ul> | |||
{{Template:String:Reverse footer}} | {{Template:String:Reverse footer}} |
Revision as of 05:37, 2 February 2011
Return string characters in right-to-left order (String class)
The Reverse intrinsic function returns the characters in the method object string in right-to-left order.
Syntax
%outString = string:Reverse
Syntax terms
%outString | A string or to receive the re-ordered characters from the input method objectstring. |
---|---|
string | The input string to which the method is applied. |
Usage notes
- The Reverse function is available as of Sirius Mods version 7.3.
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
- For details of the printtext statement, please see printText