blob: 1c994a1c59e128e6a4903306f283d01a2c9de610 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
import { u16, u32 } from "./diplomat-runtime"
import { FFIError } from "./diplomat-runtime"
import { CodePointRangeIterator } from "./CodePointRangeIterator";
import { ICU4XDataProvider } from "./ICU4XDataProvider";
import { ICU4XError } from "./ICU4XError";
import { ICU4XScriptWithExtensionsBorrowed } from "./ICU4XScriptWithExtensionsBorrowed";
/**
* An ICU4X ScriptWithExtensions map object, capable of holding a map of codepoints to scriptextensions values
* See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensions.html Rust documentation for `ScriptWithExtensions`} for more information.
*/
export class ICU4XScriptWithExtensions {
/**
* See the {@link https://docs.rs/icu/latest/icu/properties/script/fn.script_with_extensions.html Rust documentation for `script_with_extensions`} for more information.
* @throws {@link FFIError}<{@link ICU4XError}>
*/
static create(provider: ICU4XDataProvider): ICU4XScriptWithExtensions | never;
/**
* Get the Script property value for a code point
* See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_val Rust documentation for `get_script_val`} for more information.
*/
get_script_val(code_point: u32): u16;
/**
* Check if the Script_Extensions property of the given code point covers the given script
* See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.has_script Rust documentation for `has_script`} for more information.
*/
has_script(code_point: u32, script: u16): boolean;
/**
* Borrow this object for a slightly faster variant with more operations
* See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensions.html#method.as_borrowed Rust documentation for `as_borrowed`} for more information.
*/
as_borrowed(): ICU4XScriptWithExtensionsBorrowed;
/**
* Get a list of ranges of code points that contain this script in their Script_Extensions values
* See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_extensions_ranges Rust documentation for `get_script_extensions_ranges`} for more information.
*/
iter_ranges_for_script(script: u16): CodePointRangeIterator;
}
|