Character.GetName(Int32) Method

Definition

Returns the Unicode name of the specified character codePoint, or null if the code point is #UNASSIGNED unassigned.

[Android.Runtime.Register("getName", "(I)Ljava/lang/String;", "")]
public static string? GetName (int codePoint);
[<Android.Runtime.Register("getName", "(I)Ljava/lang/String;", "")>]
static member GetName : int -> string

Parameters

codePoint
Int32

the character (Unicode code point)

Returns

the Unicode name of the specified character, or null if the code point is unassigned.

Attributes

Exceptions

if codePoint is not a valid code point.

Remarks

Returns the Unicode name of the specified character codePoint, or null if the code point is #UNASSIGNED unassigned.

Note: if the specified character is not assigned a name by the UnicodeData file (part of the Unicode Character Database maintained by the Unicode Consortium), the returned name is the same as the result of expression:

<blockquote>Character.UnicodeBlock.of(codePoint).toString().replace('_', ' ') + " " + Integer.toHexString(codePoint).toUpperCase(Locale.ROOT);</blockquote>

Added in 1.7.

Java documentation for java.lang.Character.getName(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