Longhorn PHP 2025 - Call For Papers

Voting

: six minus four?
(Example: nine)

The Note You're Voting On

bruha
17 years ago
To count str_length in UTF-8 string i use

$count = preg_match_all("/[[:print:]\pL]/u", $str, $pockets);

where
[:print:] - printing characters, including space
\pL - UTF-8 Letter
/u - UTF-8 string
other unicode character properties on http://www.pcre.org/pcre.txt

<< Back to user notes page

To Top