symfony/polyfill-intl-grapheme's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
The "Symfony polyfill-intl-grapheme" is a package that provides a partial, native PHP implementation of the Grapheme functions from the Intl extension. The features of this package include functions that allow you to manipulate and manage text buffers encoded in UTF-8, find the position of first and last occurrence of a case-insensitive string or a specific string in grapheme units, determine the length of a string in grapheme units, and return part of a string.
The "Symfony polyfill-intl-grapheme" package is installed and used in your PHP application via composer. You can install it by running the command
composer require symfony/polyfill-intl-grapheme. Once it's installed, you can use it in your PHP script like this:
use Symfony\Polyfill\Intl\Grapheme\Grapheme; // Extract a sequence of grapheme clusters from a text buffer. echo Grapheme::grapheme_extract($text, $size, $type, $start, $next); // Get string length in grapheme units. echo Grapheme::grapheme_strlen($text); // Find the position of the first occurrence of a case-insensitive string. echo Grapheme::grapheme_stripos($haystack, $needle); // The rest of the functions can be used similarly.
The official documentation of the "Symfony polyfill-intl-grapheme" package can be found in the main Polyfill README at GitHub. This provides additional information and guides on how to use the library correctly in your PHP applications.