1 (edited by FSX 2008-03-02 20:36)

Topic: mb_strlen / pun_strlen ?

I saw this function in functions.php:

//
// An UTF-8 aware version of strlen()
//
function pun_strlen($str)
{
    return strlen(utf8_decode($str));
}

But why not use mb_strlen()? I don't know much about that utf-8 stuff, but I red somewhere that mbstring functions should be used with utf-8.

Re: mb_strlen / pun_strlen ?

mb_* functions are slow and not enabled on all setups.