// generated by diplomat-tool import type { LocaleParseError } from "./LocaleParseError" import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
/** *AnICU4XLocale,capableofrepresentingstringslike`"en-US"`. * *Seethe[Rustdocumentationfor`Locale`](https://docs.rs/icu/2.1.1/icu/locale/struct.Locale.html) for more information.
*/
export class Locale { /** @internal */
get ffiValue(): pointer; /** @internal */
constructor();
/** *Constructan{@linkLocale}fromanlocaleidentifier. * *Thiswillrunthecompletelocaleparsingalgorithm.Ifcodesizeand *performancearecriticalandthelocaleisofaknownshape(suchas *`aa-BB`)use`create_und`,`set_language`,`set_script`,and`set_region`. * *Seethe[Rustdocumentationfor`try_from_str`](https://docs.rs/icu/2.1.1/icu/locale/struct.Locale.html#method.try_from_str) for more information.
*/ static fromString(name: string): Locale;
/** *Constructaunknown{@linkLocale}"und". * *Seethe[Rustdocumentationfor`UNKNOWN`](https://docs.rs/icu/2.1.1/icu/locale/struct.Locale.html#associatedconstant.UNKNOWN) for more information.
*/ static unknown(): Locale;
/** *Clonesthe{@linkLocale}. * *Seethe[Rustdocumentationfor`Locale`](https://docs.rs/icu/2.1.1/icu/locale/struct.Locale.html) for more information.
*/
clone(): Locale;
/** *Returnsastringrepresentationofthe`LanguageIdentifier`partof *{@linkLocale}. * *Seethe[Rustdocumentationfor`id`](https://docs.rs/icu/2.1.1/icu/locale/struct.Locale.html#structfield.id) for more information.
*/
get basename(): string;
/** *Returnsastringrepresentationoftheunicodeextension. * *Seethe[Rustdocumentationfor`extensions`](https://docs.rs/icu/2.1.1/icu/locale/struct.Locale.html#structfield.extensions) for more information.
*/
getUnicodeExtension(s: string): string | null;
/** *SetaUnicodeextension. * *Seethe[Rustdocumentationfor`extensions`](https://docs.rs/icu/2.1.1/icu/locale/struct.Locale.html#structfield.extensions) for more information.
*/
setUnicodeExtension(k: string, v: string): boolean;
/** *Returnsastringrepresentationof{@linkLocale}language. * *Seethe[Rustdocumentationfor`id`](https://docs.rs/icu/2.1.1/icu/locale/struct.Locale.html#structfield.id) for more information.
*/
get language(): string;
/** *Setthelanguagepartofthe{@linkLocale}. * *Seethe[Rustdocumentationfor`try_from_str`](https://docs.rs/icu/2.1.1/icu/locale/struct.Locale.html#method.try_from_str) for more information.
*/
set language(s: string);
/** *Returnsastringrepresentationof{@linkLocale}region. * *Seethe[Rustdocumentationfor`id`](https://docs.rs/icu/2.1.1/icu/locale/struct.Locale.html#structfield.id) for more information.
*/
get region(): string | null;
/** *Settheregionpartofthe{@linkLocale}. * *Seethe[Rustdocumentationfor`try_from_str`](https://docs.rs/icu/2.1.1/icu/locale/struct.Locale.html#method.try_from_str) for more information.
*/
set region(s: string);
/** *Returnsastringrepresentationof{@linkLocale}script. * *Seethe[Rustdocumentationfor`id`](https://docs.rs/icu/2.1.1/icu/locale/struct.Locale.html#structfield.id) for more information.
*/
get script(): string | null;
/** *Setthescriptpartofthe{@linkLocale}.Passanemptystringtoremovethescript. * *Seethe[Rustdocumentationfor`try_from_str`](https://docs.rs/icu/2.1.1/icu/locale/struct.Locale.html#method.try_from_str) for more information.
*/
set script(s: string);
/** *Normalizesalocalestring. * *Seethe[Rustdocumentationfor`normalize`](https://docs.rs/icu/2.1.1/icu/locale/struct.Locale.html#method.normalize) for more information.
*/ static normalize(s: string): string;
/** *Returnsastringrepresentationof{@linkLocale}. * *Seethe[Rustdocumentationfor`write_to`](https://docs.rs/icu/2.1.1/icu/locale/struct.Locale.html#method.write_to) for more information.
*/
toString(): string;
/** *Seethe[Rustdocumentationfor`normalizing_eq`](https://docs.rs/icu/2.1.1/icu/locale/struct.Locale.html#method.normalizing_eq) for more information.
*/
normalizingEq(other: string): boolean;
/** *Seethe[Rustdocumentationfor`strict_cmp`](https://docs.rs/icu/2.1.1/icu/locale/struct.Locale.html#method.strict_cmp) for more information.
*/
compareToString(other: string): number;
/** *Seethe[Rustdocumentationfor`total_cmp`](https://docs.rs/icu/2.1.1/icu/locale/struct.Locale.html#method.total_cmp) for more information.
*/
compareTo(other: Locale): number;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.