TitlecaseMapper.d.ts (1944B)
1 // generated by diplomat-tool 2 import type { DataError } from "./DataError" 3 import type { DataProvider } from "./DataProvider" 4 import type { Locale } from "./Locale" 5 import type { TitlecaseOptions } from "./TitlecaseOptions" 6 import type { TitlecaseOptions_obj } from "./TitlecaseOptions" 7 import type { pointer, codepoint } from "./diplomat-runtime.d.ts"; 8 9 10 /** 11 * See the [Rust documentation for `TitlecaseMapper`](https://docs.rs/icu/latest/icu/casemap/struct.TitlecaseMapper.html) for more information. 12 */ 13 14 15 export class TitlecaseMapper { 16 get ffiValue(): pointer; 17 18 19 /** 20 * Construct a new `TitlecaseMapper` instance using a particular data source. 21 * 22 * See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/casemap/struct.TitlecaseMapper.html#method.new) for more information. 23 */ 24 static createWithProvider(provider: DataProvider): TitlecaseMapper; 25 26 /** 27 * Returns the full titlecase mapping of the given string 28 * 29 * The `v1` refers to the version of the options struct, which may change as we add more options 30 * 31 * See the [Rust documentation for `titlecase_segment`](https://docs.rs/icu/latest/icu/casemap/struct.TitlecaseMapperBorrowed.html#method.titlecase_segment) for more information. 32 */ 33 titlecaseSegment(s: string, locale: Locale, options: TitlecaseOptions_obj): string; 34 35 /** 36 * Returns the full titlecase mapping of the given string, using compiled data (avoids having to allocate a TitlecaseMapper object) 37 * 38 * The `v1` refers to the version of the options struct, which may change as we add more options 39 * 40 * See the [Rust documentation for `titlecase_segment`](https://docs.rs/icu/latest/icu/casemap/struct.TitlecaseMapperBorrowed.html#method.titlecase_segment) for more information. 41 */ 42 static titlecaseSegmentWithCompiledData(s: string, locale: Locale, options: TitlecaseOptions_obj): string; 43 44 constructor(); 45 }