ConFoo Montreal 2026: Call for Papers

Voting

: min(six, two)?
(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