grapheme_strlen

PHP 5 >= 5.3.0, PHP 7, PHP 8, PECL intl >= 1.0.0
grapheme_strlen - Get string length in grapheme units
Manual
Code Examples

grapheme_strlen( string$string ): int|false|null

Get string length in grapheme units (not bytes or characters)

Parameters

string

The string being measured for length. It must be a valid UTF-8 string.

Return Values

The length of the string on success, or false on failure.

Related Functions

Example of grapheme_strlen

Show all examples for grapheme_strlen

<?php
$char_a_ring_nfd = "a\xCC\x8A"; // 'LATIN SMALL LETTER A WITH RING ABOVE' (U+00E5) normalization form "D"
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
PHP Version:


Function grapheme_strlen:

Internationalization Functions Functions

Most used PHP functions