Debian Codegraph @

intl/icu_capi/bindings/js/ICU4XGraphemeClusterSegmenter.d.ts

raw
1 import { FFIError } from "./diplomat-runtime"
2 import { ICU4XDataProvider } from "./ICU4XDataProvider";
3 import { ICU4XError } from "./ICU4XError";
4 import { ICU4XGraphemeClusterBreakIteratorLatin1 } from "./ICU4XGraphemeClusterBreakIteratorLatin1";
5 import { ICU4XGraphemeClusterBreakIteratorUtf16 } from "./ICU4XGraphemeClusterBreakIteratorUtf16";
6 import { ICU4XGraphemeClusterBreakIteratorUtf8 } from "./ICU4XGraphemeClusterBreakIteratorUtf8";
7
8 /**
9
10 * An ICU4X grapheme-cluster-break segmenter, capable of finding grapheme cluster breakpoints in strings.
11
12 * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html Rust documentation for `GraphemeClusterSegmenter`} for more information.
13 */
14 export class ICU4XGraphemeClusterSegmenter {
15
16 /**
17
18 * Construct an {@link ICU4XGraphemeClusterSegmenter `ICU4XGraphemeClusterSegmenter`}.
19
20 * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.new Rust documentation for `new`} for more information.
21 * @throws {@link FFIError}<{@link ICU4XError}>
22 */
23 static create(provider: ICU4XDataProvider): ICU4XGraphemeClusterSegmenter | never;
24
25 /**
26
27 * Segments a string.
28
29 * Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according to the WHATWG Encoding Standard.
30
31 * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.segment_utf8 Rust documentation for `segment_utf8`} for more information.
32 */
33 segment_utf8(input: string): ICU4XGraphemeClusterBreakIteratorUtf8;
34
35 /**
36
37 * Segments a string.
38
39 * Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according to the WHATWG Encoding Standard.
40
41 * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.segment_utf16 Rust documentation for `segment_utf16`} for more information.
42 */
43 segment_utf16(input: string): ICU4XGraphemeClusterBreakIteratorUtf16;
44
45 /**
46
47 * Segments a Latin-1 string.
48
49 * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.segment_latin1 Rust documentation for `segment_latin1`} for more information.
50 */
51 segment_latin1(input: Uint8Array): ICU4XGraphemeClusterBreakIteratorLatin1;
52 }