tor-browser

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

DecomposingNormalizer.d.ts (4019B)


      1 // generated by diplomat-tool
      2 import type { DataError } from "./DataError"
      3 import type { DataProvider } from "./DataProvider"
      4 import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
      5 
      6 
      7 /**
      8 * See the [Rust documentation for `DecomposingNormalizer`](https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html) for more information.
      9 */
     10 
     11 
     12 export class DecomposingNormalizer {
     13    get ffiValue(): pointer;
     14 
     15 
     16    /**
     17     * Construct a new DecomposingNormalizer instance for NFD using compiled data.
     18     *
     19     * See the [Rust documentation for `new_nfd`](https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.new_nfd) for more information.
     20     */
     21    static createNfd(): DecomposingNormalizer;
     22 
     23    /**
     24     * Construct a new DecomposingNormalizer instance for NFD using a particular data source.
     25     *
     26     * See the [Rust documentation for `new_nfd`](https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.new_nfd) for more information.
     27     */
     28    static createNfdWithProvider(provider: DataProvider): DecomposingNormalizer;
     29 
     30    /**
     31     * Construct a new DecomposingNormalizer instance for NFKD using compiled data.
     32     *
     33     * See the [Rust documentation for `new_nfkd`](https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.new_nfkd) for more information.
     34     */
     35    static createNfkd(): DecomposingNormalizer;
     36 
     37    /**
     38     * Construct a new DecomposingNormalizer instance for NFKD using a particular data source.
     39     *
     40     * See the [Rust documentation for `new_nfkd`](https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.new_nfkd) for more information.
     41     */
     42    static createNfkdWithProvider(provider: DataProvider): DecomposingNormalizer;
     43 
     44    /**
     45     * Normalize a string
     46     *
     47     * Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according
     48     * to the WHATWG Encoding Standard.
     49     *
     50     * See the [Rust documentation for `normalize_utf8`](https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizerBorrowed.html#method.normalize_utf8) for more information.
     51     */
     52    normalize(s: string): string;
     53 
     54    /**
     55     * Check if a string is normalized
     56     *
     57     * Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according
     58     * to the WHATWG Encoding Standard.
     59     *
     60     * See the [Rust documentation for `is_normalized_utf8`](https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizerBorrowed.html#method.is_normalized_utf8) for more information.
     61     */
     62    isNormalized(s: string): boolean;
     63 
     64    /**
     65     * Check if a string is normalized
     66     *
     67     * Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according
     68     * to the WHATWG Encoding Standard.
     69     *
     70     * See the [Rust documentation for `is_normalized_utf16`](https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizerBorrowed.html#method.is_normalized_utf16) for more information.
     71     */
     72    isNormalizedUtf16(s: string): boolean;
     73 
     74    /**
     75     * Return the index a slice of potentially-invalid UTF-8 is normalized up to
     76     *
     77     * See the [Rust documentation for `split_normalized_utf8`](https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizerBorrowed.html#method.split_normalized_utf8) for more information.
     78     *
     79     * See the [Rust documentation for `split_normalized`](https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizerBorrowed.html#method.split_normalized) for more information.
     80     */
     81    isNormalizedUpTo(s: string): number;
     82 
     83    /**
     84     * Return the index a slice of potentially-invalid UTF-16 is normalized up to
     85     *
     86     * See the [Rust documentation for `split_normalized_utf16`](https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizerBorrowed.html#method.split_normalized_utf16) for more information.
     87     */
     88    isNormalizedUtf16UpTo(s: string): number;
     89 }