Character.GetName(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the 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 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 name of the specified character codePoint
, or null if the code point is #UNASSIGNED unassigned
.
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 the expression:
<blockquote>Character.UnicodeBlock.of(codePoint).toString().replace('_', ' ') + " " + Integer.toHexString(codePoint).toUpperCase(Locale.ROOT);
</blockquote>
For the codePoint
s in the UnicodeData file, the name returned by this method follows the naming scheme in the "Unicode Name Property" section of the Unicode Standard. For other code points, such as Hangul/Ideographs, The name generation rule above differs from the one defined in the Unicode Standard.
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.