Counts the number of grapheme clusters (character count) in a UTF string.
This function uses "extended grapheme clusters" as defined in Unicode: http://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries
When invalid byte sequences are encountered, each byte that does not make up a code point will be counted as one grapheme as visual representations of such broken strings will often show a square with the hexadecimal byte value in them.
the UTF-8 string
the number of grapheme clusters
See Implementation
Counts the number of grapheme clusters (character count) in a UTF string.
This function uses "extended grapheme clusters" as defined in Unicode: http://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries
When invalid byte sequences are encountered, each byte that does not make up a code point will be counted as one grapheme as visual representations of such broken strings will often show a square with the hexadecimal byte value in them.