1// generated by diplomat-tool 2import type { LocaleParseError } from "./LocaleParseError" 3import type { pointer, codepoint } from "./diplomat-runtime.d.ts"; 4 5 6/** An ICU4X Locale, capable of representing strings like `"en-US"`. 7* 8*See the [Rust documentation for `Locale`](https://docs.rs/icu/latest/icu/locale/struct.Locale.html) for more information. 9*/ 10 11 12export class Locale { 13 14 get ffiValue(): pointer; 15 16 static fromString(name: string): Locale; 17 18 static und(): Locale; 19 20 clone(): Locale; 21 22 get basename(): string; 23 24 getUnicodeExtension(s: string): string | null; 25 26 get language(): string; 27 28 set language(s: string); 29 30 get region(): string | null; 31 32 set region(s: string); 33 34 get script(): string | null; 35 36 set script(s: string); 37 38 static normalize(s: string): string; 39 40 toString(): string; 41 42 normalizingEq(other: string): boolean; 43 44 compareToString(other: string): number; 45 46 compareTo(other: Locale): number; 47}