tor-browser

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

GraphemeClusterSegmenter.d.ts (1428B)


      1 // generated by diplomat-tool
      2 import type { DataError } from "./DataError"
      3 import type { DataProvider } from "./DataProvider"
      4 import type { GraphemeClusterBreakIteratorUtf16 } from "./GraphemeClusterBreakIteratorUtf16"
      5 import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
      6 
      7 
      8 /**
      9 * An ICU4X grapheme-cluster-break segmenter, capable of finding grapheme cluster breakpoints
     10 * in strings.
     11 *
     12 * See the [Rust documentation for `GraphemeClusterSegmenter`](https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html) for more information.
     13 */
     14 
     15 
     16 export class GraphemeClusterSegmenter {
     17    get ffiValue(): pointer;
     18 
     19 
     20    /**
     21     * Construct an [`GraphemeClusterSegmenter`].
     22     *
     23     * See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.new) for more information.
     24     */
     25    static createWithProvider(provider: DataProvider): GraphemeClusterSegmenter;
     26 
     27    /**
     28     * Segments a string.
     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 `segment_utf16`](https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenterBorrowed.html#method.segment_utf16) for more information.
     34     */
     35    segment(input: string): GraphemeClusterBreakIteratorUtf16;
     36 
     37    constructor();
     38 }