ComposingNormalizer.d.ts (2984B)
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 `ComposingNormalizer`](https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html) for more information. 9 */ 10 11 12 export class ComposingNormalizer { 13 get ffiValue(): pointer; 14 15 16 /** 17 * Construct a new ComposingNormalizer instance for NFC using compiled data. 18 * 19 * See the [Rust documentation for `new_nfc`](https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.new_nfc) for more information. 20 */ 21 static createNfc(): ComposingNormalizer; 22 23 /** 24 * Construct a new ComposingNormalizer instance for NFC using a particular data source. 25 * 26 * See the [Rust documentation for `new_nfc`](https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.new_nfc) for more information. 27 */ 28 static createNfcWithProvider(provider: DataProvider): ComposingNormalizer; 29 30 /** 31 * Construct a new ComposingNormalizer instance for NFKC using compiled data. 32 * 33 * See the [Rust documentation for `new_nfkc`](https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.new_nfkc) for more information. 34 */ 35 static createNfkc(): ComposingNormalizer; 36 37 /** 38 * Construct a new ComposingNormalizer instance for NFKC using a particular data source. 39 * 40 * See the [Rust documentation for `new_nfkc`](https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.new_nfkc) for more information. 41 */ 42 static createNfkcWithProvider(provider: DataProvider): ComposingNormalizer; 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.ComposingNormalizerBorrowed.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_utf16`](https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizerBorrowed.html#method.is_normalized_utf16) for more information. 61 */ 62 isNormalized(s: string): boolean; 63 64 /** 65 * Return the index a slice of potentially-invalid UTF-16 is normalized up to 66 * 67 * See the [Rust documentation for `split_normalized_utf16`](https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizerBorrowed.html#method.split_normalized_utf16) for more information. 68 */ 69 isNormalizedUpTo(s: string): number; 70 }