UnicodeEQ, UnicodeNE, UnicodeLT, UnicodeLE, UnicodeGE and UnicodeGT (Unicode functions): Difference between revisions
Jump to navigation
Jump to search
m (→Syntax) |
|||
Line 6: | Line 6: | ||
with characters that are not translatable to EBCDIC. | with characters that are not translatable to EBCDIC. | ||
==Syntax== | ==Syntax (same for UnicodeNE, UnicodeLT, UnicodeLE, UnicodeGE, and UnicodeGT)== | ||
{{Template:Unicode:UnicodeEQ syntax}} | {{Template:Unicode:UnicodeEQ syntax}} | ||
Revision as of 20:48, 2 April 2012
Compare unicode strings (Unicode class)
[Introduced in Sirius Mods 7.9]
These Unicode comparison methods perform the named comparison operation between their Unicode
string method objects and the method argument values. The methods are useful whenever you need to
do comparisons and ordinary EBCDIC string comparisons are not sufficient, say where you may be working
with characters that are not translatable to EBCDIC.
Syntax (same for UnicodeNE, UnicodeLT, UnicodeLE, UnicodeGE, and UnicodeGT)
%number = unicode:UnicodeEQ( comparand)
Syntax terms
%number | number |
---|---|
unicode | A Unicode string. |
comparand | Unicode |
Usage notes
- Unicode comparisons might be useful if you want to use ASCII/Unicode ordering of string values (numbers < uppercase < lowercase).
Examples
The following comparison succeeds:
if %dessert:unicodeEq('Apple π':u) then ...
However, the following comparison does not:
if %dessert eq 'Apple π':u
Model 204 will try to convert Unicode pi to EBCDIC, and that operation will fail.