Method CodePointCount
CodePointCount(String, Int32, Int32)
Returns the number of Unicode code points in the specified text
range of this beginIndex
and extends to the
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(this string str, int beginIndex, int endIndex)
Parameters
Type | Name | Description |
---|---|---|
System.String | str | |
System.Int32 | beginIndex | the index to the first |
System.Int32 | endIndex | the index after the last |
Returns
Type | Description |
---|---|
System.Int32 | the number of Unicode code points in the specified text range |