mb_strlen
(PHP 4 >= 4.0.6, PHP 5)
mb_strlen — Get string length
Descrição
Gets the length of a string.
Parâmetros
-
str -
The string being checked for length.
-
encoding -
O parâmetro
encodingé a codificação de caractere. Se ele é omitido, o valor da codificação de caractere interna é usado.
Valor Retornado
Returns the number of characters in
string str having character encoding
encoding. A multi-byte character is
counted as 1.
Returns FALSE if the given encoding is invalid.
Warning
Esta função pode
retornar o booleano FALSE, mas também pode retornar um valor não-booleano que pode ser
avaliado como FALSE, como 0 ou
"". Leia a seção em Booleanos para maiores
informações. Utilize o operador ===
para testar o valor retornado por esta
função.
Veja Também
- mb_internal_encoding() - Set/Get internal character encoding
- grapheme_strlen() - Get string length in grapheme units
- iconv_strlen() - Returns the character count of string
- strlen() - Retorna o tamanho de uma string