ToUpper and ToLower (String functions): 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:ToUpper and ToLower subtitle}} | {{Template:String:ToUpper and ToLower subtitle}} | ||
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. | The <var>ToUpper</var> and <var>ToLower</var> 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. | ||
==Syntax== | ==Syntax== | ||
{{Template:String:ToUpper syntax}} | {{Template:String:ToUpper syntax}} | ||
Line 9: | Line 8: | ||
===Syntax terms=== | ===Syntax terms=== | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>% | <tr><th>%outString</th> | ||
<td>A string | <td>A string to receive the all-uppercase or all-lowercase characters converted from the input string.</td></tr> | ||
<tr><th>string | <tr><th>string</th> | ||
<td>The input string | <td>The input, method object <var class="term>string</var>.</td></tr> | ||
</table> | </table> | ||
==Usage notes== | |||
<ul><li>These functions are available as of <var class="product">[[Sirius Mods]]</var> version 7.3.</ul> | |||
==Examples== | ==Examples== | ||
<ol><li> | |||
Example ToUpper and ToLower statements follow: | Example ToUpper and ToLower statements follow: | ||
<p class="code"> . . . | |||
%s is longstring | %s is longstring | ||
%s = 'A c E g ?4lN ,8, t v { Z' | %s = 'A c E g ?4lN ,8, t v { Z' | ||
printText {~} = '{%s:toUpper}' | |||
printText {~} = '{%s:toLower}' | printText {~} = '{%s:toLower}' | ||
. . . | . . . | ||
</p> | |||
The results are: | The results are: | ||
<p class="code"> %s:toUpper = A C E G ?4LN ,8, T V { Z | |||
%s:toLower = a c e g ?4ln ,8, t v { z | %s:toLower = a c e g ?4ln ,8, t v { z | ||
</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:ToUpper and ToLower footer}} | {{Template:String:ToUpper and ToLower footer}} |
Revision as of 06:25, 2 February 2011
Translate to uppercase/lowercase (String class)
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.
Syntax
%outString = string:ToUpper
%outString = string:ToLower
Syntax terms
%outString | A string to receive the all-uppercase or all-lowercase characters converted from the input string. |
---|---|
string | The input, method object string. |
Usage notes
- These functions are available as of Sirius Mods version 7.3.
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
- For details of the printtext statement, please see printText