Compounds |
 |  | struct | USortLine |
 |  | struct | USort |
Defines |
 |  | #define | T_USORT_EXPORT |
 |  | #define | T_USORT_IMPORT |
 |  | #define | C_USORT_API |
 |  | #define | T_USORT_API |
 |  | #define | T_USORT_EXPORT_API |
Functions |
 |  | T_USORT_API USort* | usort_open (const char *locale, UCollationStrength strength, bool_t ownText, UErrorCode *status) |
 |  | | Open a USort object. More...
|
 |  | T_USORT_API void | usort_close (USort *usort) |
 |  | | Close a USort object. More...
|
 |  | T_USORT_API void | usort_addLine (USort *usort, const UChar *line, int32_t len, bool_t copy, void *userData) |
 |  | | Add a line of text to the list. More...
|
 |  | T_USORT_API void | usort_addLinesFromFILE ( USort *sort, FILE *file, UConverter *inConverter, bool_t escapeMode) |
 |  | | Add a bunch of lines to the list from a FILE, converting as necessary. More...
|
 |  | T_USORT_API void | usort_sort (USort *usort) |
 |  | | Do the final sort. More...
|
 |  | T_USORT_API void | usort_printToFILE (USort *usort, FILE *file, UConverter *toConverter) |
 |  | | Print out the contents of the sorted list to some FILE [convenience]. More...
|
Add a line of text to the list.
if ownsText was FALSE, then the text will be copied. Note: text MUST be null terminated if it's not being copied !
-
Parameters:
-
usort
|
The sort object to add to |
line
|
Text to be added. [Typically, will not end with CR or LF] |
len
|
Length of text passed in. -1 if null terminated. |
copy
|
TRUE if the text should be copied. Text WILL be copied if len is not -1. |
userData
|
Your additional reference data can go here. Pass in NULL by default. |
Add a bunch of lines to the list from a FILE, converting as necessary.
Break lines at LF. [todo: use linebreakiterator] [convenience]
-
Parameters:
-
usort
|
the sort object to add to |
file
|
FILE to read data from. Will read until EOF. |
inConverter
|
Converter to use to convert data in the FILE. If NULL, the converter specified by ucnv_getDefaultName() will be used. |
escapeMode
|
If TRUE, sequences such as \u0308 will be recognized. |