tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

Collator.d.ts (1895B)


      1 // generated by diplomat-tool
      2 import type { CollatorOptions } from "./CollatorOptions"
      3 import type { CollatorOptions_obj } from "./CollatorOptions"
      4 import type { CollatorResolvedOptions } from "./CollatorResolvedOptions"
      5 import type { DataError } from "./DataError"
      6 import type { DataProvider } from "./DataProvider"
      7 import type { Locale } from "./Locale"
      8 import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
      9 
     10 
     11 /**
     12 * See the [Rust documentation for `Collator`](https://docs.rs/icu/latest/icu/collator/struct.Collator.html) for more information.
     13 */
     14 
     15 
     16 export class Collator {
     17    get ffiValue(): pointer;
     18 
     19 
     20    /**
     21     * Construct a new Collator instance using compiled data.
     22     *
     23     * See the [Rust documentation for `try_new`](https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.try_new) for more information.
     24     */
     25    static create(locale: Locale, options: CollatorOptions_obj): Collator;
     26 
     27    /**
     28     * Compare two strings.
     29     *
     30     * Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according
     31     * to the WHATWG Encoding Standard.
     32     *
     33     * See the [Rust documentation for `compare_utf16`](https://docs.rs/icu/latest/icu/collator/struct.CollatorBorrowed.html#method.compare_utf16) for more information.
     34     */
     35    compare(left: string, right: string): number;
     36 
     37    /**
     38     * The resolved options showing how the default options, the requested options,
     39     * and the options from locale data were combined. None of the struct fields
     40     * will have `Auto` as the value.
     41     *
     42     * See the [Rust documentation for `resolved_options`](https://docs.rs/icu/latest/icu/collator/struct.CollatorBorrowed.html#method.resolved_options) for more information.
     43     */
     44    get resolvedOptions(): CollatorResolvedOptions;
     45 
     46    constructor(provider: DataProvider, locale: Locale, options: CollatorOptions_obj);
     47 }