Inheritance diagram for UCollator:
Public Types | |
typedef void * | UParseError |
typedef AttributeValue | Strength |
enum | Attribute { FrenchCollation, AlternateHandling, CaseFirst, CaseLevel, NormalizationMode, DecompositionMode = NormalizationMode, strength, HiraganaQuaternaryMode, NumericCollation, AttributeCount } |
enum | AttributeValue { Default = -1, Primary = 0, Secondary = 1, Tertiary = 2, DefaultStrength = Tertiary, CeStrengthLimit, Quaternary = 3, Identical = 15, strengthLimit, Off = 16, On = 17, Shifted = 20, NonIgnorable = 21, LowerFirst = 24, UpperFirst = 25, AttributeValueCount } |
enum | RuleOption { TailoringOnly, FullRules } |
enum | BoundMode { BoundLower = 0, BoundUpper = 1, BoundUpperLong = 2, BoundValueCount } |
Public Member Functions | |
this (ULocale locale) | |
this (UText rules, AttributeValue mode, Strength strength) | |
this (char[] shortName, bool forceDefaults) | |
package | this (Handle handle) |
~this () | |
void | getContractions (USet set) |
int | strcoll (UText source, UText target) |
bool | greater (UText source, UText target) |
bool | greaterOrEqual (UText source, UText target) |
bool | equal (UText source, UText target) |
Strength | getStrength () |
void | setStrength (Strength s) |
void | getDisplayName (ULocale obj, ULocale display, UString dst) |
void | getRules (UString dst, RuleOption o=RuleOption.FullRules) |
char[] | getShortDefinitionString (ULocale locale=ULocale.Default) |
char[] | normalizeShortDefinitionString (char[] source) |
ubyte[] | getSortKey (UText t, ubyte[] result) |
ubyte[] | mergeSortkeys (ubyte[] left, ubyte[] right, ubyte[] result) |
ubyte[] | getBound (BoundMode mode, ubyte[] source, ubyte[] result, uint levels=1) |
void | getVersion (inout Version v) |
void | getUCAVersion (inout Version v) |
void | setAttribute (Attribute attr, AttributeValue value) |
AttributeValue | getAttribute (Attribute attr) |
void | setVariableTop (UText t) |
void | setVariableTop (uint x) |
uint | getVariableTop () |
void | getLocale (ULocale locale, ULocale.Type type) |
USet | getTailoredSet () |
Static Public Member Functions | |
this () | |
~this () | |
Public Attributes | |
package Handle | handle |
Static Public Attributes | |
FunctionLoader Bind[] | targets |
Private Types | |
typedef void * | Handle |
enum | Error { OK, BufferOverflow = 15 } |
Static Private Member Functions | |
bool | isError (Error e) |
void | testError (Error e, char[] msg) |
char * | toString (char[] string) |
wchar * | toString (wchar[] string) |
uint | length (char *s) |
uint | length (wchar *s) |
char[] | toArray (char *s) |
wchar[] | toArray (wchar *s) |
Static Private Attributes | |
void * | library |
For more information about the collation service see the users guide.
Collation service provides correct sorting orders for most locales supported in ICU. If specific data for a locale is not available, the orders eventually falls back to the UCA sort order.
Sort ordering may be customized by providing your own set of rules. For more on this subject see the Collation customization section of the users guide.
See this page for full details.
Definition at line 115 of file UCollator.d.
|
Definition at line 119 of file UCollator.d. |
|
Definition at line 169 of file UCollator.d. Referenced by getStrength(), setStrength(), and this(). |
|
Use this for the primary argument-type to most ICU functions |
|
Definition at line 121 of file UCollator.d. |
|
Definition at line 135 of file UCollator.d. |
|
Definition at line 155 of file UCollator.d. |
|
Definition at line 161 of file UCollator.d. |
|
ICU error codes (the ones which are referenced) |
|
Close a UCollator Definition at line 248 of file UCollator.d. |
|
Definition at line 729 of file UCollator.d. |
|
Open a UCollator for comparing strings. The locale specified determines the required collation rules. Special values for locales can be passed in - if ULocale.Default is passed for the locale, the default locale collation rules will be used. If ULocale.Root is passed, UCA rules will be used Definition at line 181 of file UCollator.d. References ICU::testError(), and ICU::toString(). |
|
Produce a UCollator instance according to the rules supplied. The rules are used to change the default ordering, defined in the UCA in a process called tailoring. For the syntax of the rules please see users guide Definition at line 199 of file UCollator.d. References Strength, and ICU::testError(). |
|
Open a collator defined by a short form string. The structure and the syntax of the string is defined in the "Naming collators" section of the users guide: http://oss.software.ibm.com/icu/userguide/Collate_Concepts.html#Naming_Collators Attributes are overriden by the subsequent attributes. So, for "S2_S3", final strength will be 3. 3066bis locale overrides individual locale parts. The call to this constructor is equivalent to a plain constructor, followed by a series of calls to setAttribute and setVariableTop Definition at line 223 of file UCollator.d. References ICU::testError(), and ICU::toString(). |
|
Internal constructor invoked via USearch Definition at line 237 of file UCollator.d. |
|
Get a set containing the contractions defined by the collator. The set includes both the UCA contractions and the contractions defined by the collator. This set will contain only strings. If a tailoring explicitly suppresses contractions from the UCA (like Russian), removed contractions will not be in the resulting set. Definition at line 266 of file UCollator.d. References USet::handle, and ICU::testError(). |
|
Compare two strings. Return value is -, 0, + Definition at line 280 of file UCollator.d. References UText::get(), and UText::len. |
|
Determine if one string is greater than another. This function is equivalent to strcoll() > 1 Definition at line 292 of file UCollator.d. References UText::get(), and UText::len. |
|
Determine if one string is greater than or equal to another. This function is equivalent to strcoll() >= 0 Definition at line 304 of file UCollator.d. References UText::get(), and UText::len. |
|
This function is equivalent to strcoll() == 0 Definition at line 315 of file UCollator.d. References UText::get(), and UText::len. |
|
Get the collation strength used in a UCollator. The strength influences how strings are compared. Definition at line 327 of file UCollator.d. References Strength. |
|
Set the collation strength used in this UCollator. The strength influences how strings are compared. one of Primary, Secondary, Tertiary, Quaternary, Dentical, or Default Definition at line 341 of file UCollator.d. References Strength. |
|
Get the display name for a UCollator. The display name is suitable for presentation to a user Definition at line 353 of file UCollator.d. References UString::format(), UText::get(), UText::len, ULocale::name, and ICU::toString(). |
|
Returns current rules. Options define whether full rules are returned or just the tailoring. Definition at line 370 of file UCollator.d. References UString::format(), UText::get(), and UText::len. |
|
Get the short definition string for a collator. This API harvests the collator's locale and the attribute set and produces a string that can be used for opening a collator with the same properties using the char[] style constructor. This string will be normalized. The structure and the syntax of the string is defined in the "Naming collators" section of the users guide: http://oss.software.ibm.com/icu/userguide/Collate_Concepts.html#Naming_Collators Definition at line 398 of file UCollator.d. References ULocale::name, ICU::testError(), and ICU::toString(). |
|
Verifies and normalizes short definition string. Normalized short definition string has all the option sorted by the argument name, so that equivalent definition strings are the same Definition at line 417 of file UCollator.d. References ICU::testError(), and ICU::toString(). |
|
Get a sort key for a string from a UCollator. Sort keys may be compared using strcmp. Definition at line 434 of file UCollator.d. References UText::get(), and UText::len. |
|
Merge two sort keys. The levels are merged with their corresponding counterparts (primaries with primaries, secondaries with secondaries etc.). Between the values from the same level a separator is inserted. example (uncompressed): 191B1D 01 050505 01 910505 00 and 1F2123 01 050505 01 910505 00 will be merged as 191B1D 02 1F212301 050505 02 050505 01 910505 02 910505 00 This allows for concatenating of first and last names for sorting, among other things. If the destination buffer is not big enough, the results are undefined. If any of source lengths are zero or any of source pointers are null/undefined, result is of size zero. Definition at line 459 of file UCollator.d. |
|
Produce a bound for a given sortkey and a number of levels. Return value is always the number of bytes needed, regardless of whether the result buffer was big enough or even valid. Resulting bounds can be used to produce a range of strings that are between upper and lower bounds. For example, if bounds are produced for a sortkey of string "smith", strings between upper and lower bounds with one level would include "Smith", "SMITH", "sMiTh". There are two upper bounds that can be produced. If BoundUpper is produced, strings matched would be as above. However, if bound produced using BoundUpperLong is used, the above example will also match "Smithsonian" and similar. Definition at line 487 of file UCollator.d. References ICU::testError(). |
|
Gets the version information for a Collator. Version is currently an opaque 32-bit number which depends, among other things, on major versions of the collator tailoring and UCA Definition at line 508 of file UCollator.d. |
|
Gets the UCA version information for this Collator Definition at line 519 of file UCollator.d. |
|
Universal attribute setter Definition at line 530 of file UCollator.d. References ICU::testError(). |
|
Universal attribute getter Definition at line 544 of file UCollator.d. References ICU::testError(). |
|
Variable top is a two byte primary value which causes all the codepoints with primary values that are less or equal than the variable top to be shifted when alternate handling is set to Shifted. Definition at line 562 of file UCollator.d. References UText::get(), UText::len, and ICU::testError(). |
|
Sets the variable top to a collation element value supplied.Variable top is set to the upper 16 bits. Lower 16 bits are ignored. Definition at line 578 of file UCollator.d. References ICU::testError(). |
|
Gets the variable top value of this Collator. Lower 16 bits are undefined and should be ignored. Definition at line 593 of file UCollator.d. References ICU::testError(). |
|
Gets the locale name of the collator. If the collator is instantiated from the rules, then this function will throw an exception Definition at line 610 of file UCollator.d. References ICU::isError(), ULocale::name, and ICU::toArray(). |
|
Get the Unicode set that contains all the characters and sequences tailored in this collator. Definition at line 626 of file UCollator.d. References ICU::testError(), and USet. |
|
Definition at line 720 of file UCollator.d. |
|
Definition at line 110 of file ICU.d. Referenced by UConverter::detectSignature(), UString::format(), getLocale(), and UConverter::this(). |
|
|
|
Definition at line 160 of file ICU.d. References string. |
|
Definition at line 182 of file ICU.d. References strlen(). |
|
Definition at line 191 of file ICU.d. References wcslen(). |
|
Definition at line 200 of file ICU.d. References strlen(). Referenced by UConverter::detectSignature(), UResourceBundle::getKey(), UResourceBundle::getLocale(), UMessageFormat::getLocale(), getLocale(), UConverter::getName(), UChar::getPropertyName(), UChar::getPropertyValueName(), and UConverter::opApply(). |
|
Definition at line 211 of file ICU.d. References wcslen(). |
|
Definition at line 117 of file UCollator.d. Referenced by USearch::setCollator(). |
|
Bind the ICU functions from a shared library. This is complicated by the issues regarding D and DLLs on the Windows platform Definition at line 644 of file UCollator.d. |
|
Initial value: [ {cast(void**) &ucol_open, "ucol_open"} Definition at line 685 of file UCollator.d. |