Character.CharCount(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.
Determines the number of char
values needed to
represent the specified character (Unicode code point).
[Android.Runtime.Register("charCount", "(I)I", "")]
public static int CharCount (int codePoint);
[<Android.Runtime.Register("charCount", "(I)I", "")>]
static member CharCount : int -> int
Parameters
- codePoint
- Int32
the character (Unicode code point) to be tested.
Returns
2 if the character is a valid supplementary character; 1 otherwise.
- Attributes
Remarks
Determines the number of char
values needed to represent the specified character (Unicode code point). If the specified character is equal to or greater than 0x10000, then the method returns 2. Otherwise, the method returns 1.
This method doesn't validate the specified character to be a valid Unicode code point. The caller must validate the character value using #isValidCodePoint(int) isValidCodePoint
if necessary.
Added in 1.5.
Java documentation for java.lang.Character.charCount(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.