Lines Matching refs:mb_strlen
2 mb_strlen()
20 print mb_strlen($ascii,'ASCII') . "\n";
24 print mb_strlen($euc_jp,'EUC-JP') . "\n";
30 print mb_strlen($sjis,'SJIS') . "\n";
34 // mb_strlen used to wrongly treat 0x80 as the starting byte of a 2-byte SJIS character
35 print mb_strlen("\x80\xA1", 'SJIS') . "\n";
36 print mb_strlen("abc\xFD\xFE\xFF", 'SJIS') . "\n";
39 print mb_strlen("\x80\xA1", "CP932") . "\n";
41 print mb_strlen("abc\xFD\xFE\xFF", 'CP932') . "\n";
42 print mb_strlen("\x80\xA1", "SJIS-win") . "\n";
43 print mb_strlen("abc\xFD\xFE\xFF", 'SJIS-win') . "\n";
46 print mb_strlen("\x80\xA1", 'MacJapanese') . "\n";
47 print mb_strlen("abc\xFD\xFE\xFF", 'MacJapanese') . "\n";
50 print mb_strlen("\x80\xA1", 'SJIS-2004') . "\n";
51 print mb_strlen("abc\xFD\xFE\xFF", 'SJIS-2004') . "\n";
54 print mb_strlen("\x80\xA1", 'SJIS-Mobile#DOCOMO') . "\n";
55 print mb_strlen("abc\xFD\xFE\xFF", 'SJIS-Mobile#DOCOMO') . "\n";
58 print mb_strlen("\x80\xA1", 'SJIS-Mobile#KDDI') . "\n";
59 print mb_strlen("abc\xFD\xFE\xFF", 'SJIS-Mobile#KDDI') . "\n";
62 print mb_strlen("\x80\xA1", 'SJIS-Mobile#SoftBank') . "\n";
63 print mb_strlen("abc\xFD\xFE\xFF", 'SJIS-Mobile#SoftBank') . "\n";
67 print mb_strlen($jis,'JIS') . "\n";
73 print mb_strlen($utf8,'UTF-8') . " codepoints\n";
79 print mb_strlen($utf8, 'UTF-8') . "\n";
80 print mb_strlen($long_utf8, 'UTF-8') . "\n";
83 // Optimized mb_strlen can be used on UTF-8 strings after they are checked for validity
86 print mb_strlen($utf8, 'UTF-8') . "\n";
87 print mb_strlen($long_utf8, 'UTF-8') . "\n";
91 print mb_strlen($str, 'UTF-8') . "\n";
98 var_dump( mb_strlen($euc_jp, 'BAD_NAME') );
150 mb_strlen(): Argument #2 ($encoding) must be a valid encoding, "BAD_NAME" given