Partager via


UCharacter.GetPropertyValueName(Int32, Int32, Int32) Method

Definition

<strong>[icu]</strong> Return the Unicode name for a given property value, as given in the Unicode database file PropertyValueAliases.

[Android.Runtime.Register("getPropertyValueName", "(III)Ljava/lang/String;", "", ApiSince=24)]
public static string? GetPropertyValueName (int property, int value, int nameChoice);
[<Android.Runtime.Register("getPropertyValueName", "(III)Ljava/lang/String;", "", ApiSince=24)>]
static member GetPropertyValueName : int * int * int -> string

Parameters

property
Int32

UProperty selector constant. UProperty.INT_START &lt;= property &lt; UProperty.INT_LIMIT or UProperty.BINARY_START &lt;= property &lt; UProperty.BINARY_LIMIT or UProperty.MASK_START &lt; = property &lt; UProperty.MASK_LIMIT. If out of range, null is returned.

value
Int32

selector for a value for the given property. In general, valid values range from 0 up to some maximum. There are a few exceptions: (1.) UProperty.BLOCK values begin at the non-zero value BASIC_LATIN.getID(). (2.) UProperty.CANONICAL_COMBINING_CLASS values are not contiguous and range from 0..240. (3.) UProperty.GENERAL_CATEGORY_MASK values are mask values produced by left-shifting 1 by UCharacter.getType(). This allows grouped categories such as [:L:] to be represented. Mask values are non-contiguous.

nameChoice
Int32

UProperty.NameChoice selector for which name to get. All values have a long name. Most have a short name, but some do not. Unicode allows for additional names; if present these will be returned by UProperty.NameChoice.LONG + i, where i=1, 2,...

Returns

a name, or null if Unicode explicitly defines no name ("n/a") for a given property/value/nameChoice. If a given nameChoice throws an exception, then all larger values of nameChoice will throw an exception. If null is returned for a given nameChoice, then other nameChoice values may return non-null results.

Attributes

Remarks

<strong>[icu]</strong> Return the Unicode name for a given property value, as given in the Unicode database file PropertyValueAliases.txt. Most values have more than one name. The nameChoice determines which one is returned.

Note: Some of the names in PropertyValueAliases.txt can only be retrieved using UProperty.GENERAL_CATEGORY_MASK, not UProperty.GENERAL_CATEGORY. These include: "C" / "Other", "L" / "Letter", "LC" / "Cased_Letter", "M" / "Mark", "N" / "Number", "P" / "Punctuation", "S" / "Symbol", and "Z" / "Separator".

Java documentation for android.icu.lang.UCharacter.getPropertyValueName(int, int, int).

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