| 1 | import { FFIError } from "./diplomat-runtime" |
| 2 | import { ICU4XCollatorOptionsV1 } from "./ICU4XCollatorOptionsV1"; |
| 3 | import { ICU4XCollatorResolvedOptionsV1 } from "./ICU4XCollatorResolvedOptionsV1"; |
| 4 | import { ICU4XDataProvider } from "./ICU4XDataProvider"; |
| 5 | import { ICU4XError } from "./ICU4XError"; |
| 6 | import { ICU4XLocale } from "./ICU4XLocale"; |
| 7 | import { ICU4XOrdering } from "./ICU4XOrdering"; |
| 8 | |
| 9 | /** |
| 10 | |
| 11 | * See the {@link https://docs.rs/icu/latest/icu/collator/struct.Collator.html Rust documentation for `Collator`} for more information. |
| 12 | */ |
| 13 | export class ICU4XCollator { |
| 14 | |
| 15 | /** |
| 16 | |
| 17 | * Construct a new Collator instance. |
| 18 | |
| 19 | * See the {@link https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.try_new Rust documentation for `try_new`} for more information. |
| 20 | * @throws {@link FFIError}<{@link ICU4XError}> |
| 21 | */ |
| 22 | static create_v1(provider: ICU4XDataProvider, locale: ICU4XLocale, options: ICU4XCollatorOptionsV1): ICU4XCollator | never; |
| 23 | |
| 24 | /** |
| 25 | |
| 26 | * Compare two strings. |
| 27 | |
| 28 | * Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according to the WHATWG Encoding Standard. |
| 29 | |
| 30 | * See the {@link https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.compare_utf8 Rust documentation for `compare_utf8`} for more information. |
| 31 | */ |
| 32 | compare(left: string, right: string): ICU4XOrdering; |
| 33 | |
| 34 | /** |
| 35 | |
| 36 | * Compare two strings. |
| 37 | |
| 38 | * See the {@link https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.compare Rust documentation for `compare`} for more information. |
| 39 | */ |
| 40 | compare_valid_utf8(left: string, right: string): ICU4XOrdering; |
| 41 | |
| 42 | /** |
| 43 | |
| 44 | * Compare two strings. |
| 45 | |
| 46 | * Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according to the WHATWG Encoding Standard. |
| 47 | |
| 48 | * See the {@link https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.compare_utf16 Rust documentation for `compare_utf16`} for more information. |
| 49 | */ |
| 50 | compare_utf16(left: string, right: string): ICU4XOrdering; |
| 51 | |
| 52 | /** |
| 53 | |
| 54 | * The resolved options showing how the default options, the requested options, and the options from locale data were combined. None of the struct fields will have `Auto` as the value. |
| 55 | |
| 56 | * See the {@link https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.resolved_options Rust documentation for `resolved_options`} for more information. |
| 57 | */ |
| 58 | resolved_options(): ICU4XCollatorResolvedOptionsV1; |
| 59 | } |