共用方式為


UScript.GetCode Method

Definition

Overloads

GetCode(ULocale)

Gets a script codes associated with the given locale or ISO 15924 abbreviation or name.

GetCode(Locale)

Gets a script codes associated with the given locale or ISO 15924 abbreviation or name.

GetCode(String)

Gets the script codes associated with the given locale or ISO 15924 abbreviation or name.

GetCode(ULocale)

Gets a script codes associated with the given locale or ISO 15924 abbreviation or name.

[Android.Runtime.Register("getCode", "(Landroid/icu/util/ULocale;)[I", "", ApiSince=24)]
public static int[]? GetCode (Android.Icu.Util.ULocale? locale);
[<Android.Runtime.Register("getCode", "(Landroid/icu/util/ULocale;)[I", "", ApiSince=24)>]
static member GetCode : Android.Icu.Util.ULocale -> int[]

Parameters

locale
ULocale

ULocale

Returns

Int32[]

The script codes array. null if the the code cannot be found.

Attributes

Remarks

Gets a script codes associated with the given locale or ISO 15924 abbreviation or name. Returns MALAYAM given "Malayam" OR "Mlym". Returns LATIN given "en" OR "en_US"

Java documentation for android.icu.lang.UScript.getCode(android.icu.util.ULocale).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

GetCode(Locale)

Gets a script codes associated with the given locale or ISO 15924 abbreviation or name.

[Android.Runtime.Register("getCode", "(Ljava/util/Locale;)[I", "", ApiSince=24)]
public static int[]? GetCode (Java.Util.Locale? locale);
[<Android.Runtime.Register("getCode", "(Ljava/util/Locale;)[I", "", ApiSince=24)>]
static member GetCode : Java.Util.Locale -> int[]

Parameters

locale
Locale

Locale

Returns

Int32[]

The script codes array. null if the the code cannot be found.

Attributes

Remarks

Gets a script codes associated with the given locale or ISO 15924 abbreviation or name. Returns MALAYAM given "Malayam" OR "Mlym". Returns LATIN given "en" OR "en_US"

Java documentation for android.icu.lang.UScript.getCode(java.util.Locale).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

GetCode(String)

Gets the script codes associated with the given locale or ISO 15924 abbreviation or name.

[Android.Runtime.Register("getCode", "(Ljava/lang/String;)[I", "", ApiSince=24)]
public static int[]? GetCode (string? nameOrAbbrOrLocale);
[<Android.Runtime.Register("getCode", "(Ljava/lang/String;)[I", "", ApiSince=24)>]
static member GetCode : string -> int[]

Parameters

nameOrAbbrOrLocale
String

name of the script or ISO 15924 code or locale

Returns

Int32[]

The script codes array. null if the the code cannot be found.

Attributes

Remarks

Gets the script codes associated with the given locale or ISO 15924 abbreviation or name. Returns MALAYAM given "Malayam" OR "Mlym". Returns LATIN given "en" OR "en_US"

Note: To search by short or long script alias only, use #getCodeFromName(String) instead. That does a fast lookup with no access of the locale data.

Java documentation for android.icu.lang.UScript.getCode(java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to