Share via


Character.CodePointOf(String) Method

Definition

Returns the code point value of the Unicode character specified by the given Unicode character name.

[Android.Runtime.Register("codePointOf", "(Ljava/lang/String;)I", "", ApiSince=35)]
public static int CodePointOf (string name);
[<Android.Runtime.Register("codePointOf", "(Ljava/lang/String;)I", "", ApiSince=35)>]
static member CodePointOf : string -> int

Parameters

name
String

the Unicode character name

Returns

the code point value of the character specified by its name.

Attributes

Remarks

Returns the code point value of the Unicode character specified by the given Unicode character name.

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

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

The name matching is case insensitive, with any leading and trailing whitespace character removed.

Added in 9.

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