Source code
Revision control
Copy as Markdown
Other Tools
// generated by diplomat-tool
import type { DataError } from "./DataError"
import type { DataProvider } from "./DataProvider"
import type { GraphemeClusterBreakIteratorUtf16 } from "./GraphemeClusterBreakIteratorUtf16"
import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
/**
* An ICU4X grapheme-cluster-break segmenter, capable of finding grapheme cluster breakpoints
* in strings.
*
* See the [Rust documentation for `GraphemeClusterSegmenter`](https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html) for more information.
*/
export class GraphemeClusterSegmenter {
get ffiValue(): pointer;
/**
* Construct an [`GraphemeClusterSegmenter`].
*
* See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.new) for more information.
*/
static createWithProvider(provider: DataProvider): GraphemeClusterSegmenter;
/**
* Segments a string.
*
* Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according
* to the WHATWG Encoding Standard.
*
* See the [Rust documentation for `segment_utf16`](https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenterBorrowed.html#method.segment_utf16) for more information.
*/
segment(input: string): GraphemeClusterBreakIteratorUtf16;
constructor();
}