Freigeben über


UCharacter.GetIntPropertyValue(Int32, Int32) Method

Definition

<strong>[icu]</strong> Returns the property value for a Unicode property type of a code point.

[Android.Runtime.Register("getIntPropertyValue", "(II)I", "", ApiSince=24)]
public static int GetIntPropertyValue (int ch, int type);
[<Android.Runtime.Register("getIntPropertyValue", "(II)I", "", ApiSince=24)>]
static member GetIntPropertyValue : int * int -> int

Parameters

ch
Int32

code point to test.

type
Int32

UProperty selector constant, identifies which binary property to check. Must be UProperty.BINARY_START &lt;= type &lt; UProperty.BINARY_LIMIT or UProperty.INT_START &lt;= type &lt; UProperty.INT_LIMIT or UProperty.MASK_START &lt;= type &lt; UProperty.MASK_LIMIT.

Returns

numeric value that is directly the property value or, for enumerated properties, corresponds to the numeric value of the enumerated constant of the respective property value type (ECharacterCategory, ECharacterDirection, DecompositionType, etc.). Returns 0 or 1 (for false / true) for binary Unicode properties. Returns a bit-mask for mask properties. Returns 0 if 'type' is out of bounds or if the Unicode version does not have data for the property at all, or not for this code point.

Attributes

Remarks

<strong>[icu]</strong> Returns the property value for a Unicode property type of a code point. Also returns binary and mask property values.

Unicode, especially in version 3.2, defines many more properties than the original set in UnicodeData.txt.

The properties APIs are intended to reflect Unicode properties as defined in the Unicode Character Database (UCD) and Unicode Technical Reports (UTR). For details about the properties see http://www.unicode.org/.

For names of Unicode properties see the UCD file PropertyAliases.txt.

Sample usage:
            int ea = UCharacter.getIntPropertyValue(c, UProperty.EAST_ASIAN_WIDTH);
            int ideo = UCharacter.getIntPropertyValue(c, UProperty.IDEOGRAPHIC);
            boolean b = (ideo == 1) ? true : false;

Java documentation for android.icu.lang.UCharacter.getIntPropertyValue(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