countCodePoints()

Gets the number of full code points in a string.

This function is valid in v2.23.0. This function has been downloaded 2 times.

Parameter

{string} string
The string whose full code points will be counted.

Returns

{number}
The number of full code points in the given string. This differs from string.length which simply counts the amount of characters in a string even if it contains 2 characters that form a code point.

Required Function

This function directly requires the following function which is included automatically:

  • toCodePoints()
    Gets the sequence of code points that make up a specified string.

Requiring Function

This function is directly required by the following function:

  • toCodePoints()
    Gets the sequence of code points that make up a specified string.