Method CodePointCount
CodePointCount(String, Int32, Int32)
Returns the number of Unicode code points in the text range of the specified char sequence.
The text range begins at the specified beginIndex
and extends to the char at index endIndex - 1
.
Thus the length (in endIndex-beginIndex
.
Unpaired surrogates within the text range count as one code point each.
Declaration
public static int CodePointCount(string seq, int beginIndex, int endIndex)
Parameters
Type | Name | Description |
---|---|---|
System.String | seq | the char sequence |
System.Int32 | beginIndex | the index to the first char of the text range. |
System.Int32 | endIndex | the index after the last char of the text range. |
Returns
Type | Description |
---|---|
System.Int32 | the number of Unicode code points in the specified text range |
CodePointCount(Char[], Int32, Int32)
Declaration
public static int CodePointCount(char[] a, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Char[] | a | |
System.Int32 | offset | |
System.Int32 | count |
Returns
Type | Description |
---|---|
System.Int32 |