UnicodeToUpper and UnicodeToLower (Unicode functions): Difference between revisions
m (→Syntax terms) |
mNo edit summary |
||
Line 19: | Line 19: | ||
==Usage Notes== | ==Usage Notes== | ||
<ul><li><var>UnicodeToUpper</var> | <ul><li><var>UnicodeToUpper</var> and <var>UnicodeToLower</var> are available as of <var class="product">[[Sirius Mods]]</var> Version 7.7.</ul> | ||
==Examples== | ==Examples== | ||
The following code fragment: | The following code fragment: | ||
<p class="code">. . . | <p class="code">. . . | ||
Line 33: | Line 32: | ||
</p> | </p> | ||
Will produce: | Will produce: | ||
<p class=" | <p class="output">%u:UnicodeToUpper = '} ABC5XYZ! &#x0394; &#x0531; ?' | ||
%u:UnicodeToLower = '} abc5xyz! &#x03B4; &#x0561; ?' | %u:UnicodeToLower = '} abc5xyz! &#x03B4; &#x0561; ?' | ||
</p | </p> | ||
==See also== | ==See also== | ||
{{Template:Unicode:UnicodeToUpper and UnicodeToLower footer}} | {{Template:Unicode:UnicodeToUpper and UnicodeToLower footer}} |
Revision as of 23:38, 28 February 2011
Translate to uppercase/lowercase (Unicode class)
The UnicodeToUpper and UnicodeToLower functions return the Unicode 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.
Character references are returned for characters that do not translate to an EBCDIC character. The default substitute for non-displayable characters in your environment, say a question mark (?
), is returned for characters that translate to an EBCDIC character that is not displayable.
These methods produce a one-for-one character translation, which will fail to correctly handle unusual characters whose uppercase versions have two-characters.
Syntax
%outUnicode = unicode:UnicodeToUpper
%outUnicode = unicode:UnicodeToLower
Syntax terms
%outUnicode | A Unicode variable to receive the all-uppercase or all-lowercase Unicode characters. |
---|---|
unicode | The input Unicode string. |
Usage Notes
- UnicodeToUpper and UnicodeToLower are available as of Sirius Mods Version 7.7.
Examples
The following code fragment:
. . . %u is unicode %u = '} abC5xyZ! Δ Ա ß':U printText {~} = '{%u:UnicodetoUpper}' printText {~} = '{%u:UnicodetoLower}' . . .
Will produce:
%u:UnicodeToUpper = '} ABC5XYZ! Δ Ա ?' %u:UnicodeToLower = '} abc5xyz! δ ա ?'