Overview of the Intl Utils Package Routines
routines. The new routines available with system software version 7.0 are
identified by an asterisk (*).
Comparing Strings
compare strings and give their exact sorting relationship or determine
whether or not they are equal. System software version 7.0 includes parallel
'itl2' resource handle. These parallel forms, whose names end with PString,
are in the following list. If this handle is NIL, the routines behave just like the
previous routines that do not permit explicit specification of the handle.
IUCompString Compares two high-level language strings for primary and secondary ordering and determines whether one is
greater than, less than, or equal to an other
IUCompPString* Compares two high-level language strings for primary and secondary ordering and determines whether one is
greater than, less than, or equal to another and permits
explicit specification of the 'itl2' resource to be used for
string comparison.
IUMagString Compares two strings defined by a pointer and character length for primary and secondary ordering
and determines whether one is greater than, less than,
or equal to an other
character length for primary and secondary ordering
and determines whether one is greater than, less than,
or equal to another and permits explicit specification of
the 'itl2' resource to be used for string comparison
IUEqualString Compares two high-level language strings for equality in primary ordering only
in primary ordering only and permits explicit
specification of the 'itl2' resource to be used for string
comparison
character length for equality in primary ordering only
character length for equality in primary ordering only
and permits explicit specification of the 'itl2' resource
to be used for string comparison
Modifying the Standard String Comparison
To modify the standard string comparison, you need to construct your own
'itl2' resource. You may want to modify the standard string comparison if the
needs or if the string comparison for the language that concerns you is not
available. If you supply an 'itl2' resource in an application, you will need to
call the IUClearCache procedure or call one of the new PString comparison routines that allow you to pass in a handle to an 'itl2' resource. (See
For details on modifying the standard string comparison, consult Macintosh
Developer Technical Support.
Facilitating Interscript Sorting Order
between different scripts. The functions use the special script and language
codes described here and in the following routines:
IUScriptOrder* Given a pair of script codes, indicates in what order the text in the two scripts should be sorted
IULangOrder* Given a pair of language codes, indicates in what order the text in the two languages should be sorted
IUStringOrder* Given a pair of strings with a script and language code for each, indicates the proper sorting order of the
strings
IUTextOrder* Given a pair of strings defined by a pointer and character length (with a script and language code for
each), indicates the proper sorting order of the strings
The ordering of script and language codes is based on information in the 'itlm'
resource. However, the system script is always sorted first, and scripts that
are not enabled and installed are sorted last.