Comparing and collating text

The classes you use to create text-ordering objects provide the lowest level mechanism for comparing text strings. Comparison functions provided by these classes compare character data stored in two different text objects, returning information about whether a string is less than, greater than, or equal to another string.

You can use these functions for simple comparisons and to implement sorting algorithms for text elements. Functions provided by TTableBasedTextOrder are language-sensitive because they perform comparisons according to the rules of a natural language rather than according to the Unicode values. In most cases, the ordering of Unicode values associated with a set of characters does not produce correct ordering results. For example, for ASCII-based character sets, Z is ordered before a, and z is ordered before ñ.


TTextOrder is the abstract base class for comparing two text objects, providing the lowest level mechanism for sorting text elements or searching for specific text. The system includes derived classes that perform both language-sensitive and language-insensitive comparison functions:


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker