mb_strlen

(PHP 4 >= 4.0.6, PHP 5, PHP 7)

mb_strlen获取字符串的长度

说明

mb_strlen ( string $str [, string $encoding = mb_internal_encoding() ] ) : mixed

获取一个 string 的长度。

参数

str

要检查长度的字符串

encoding

encoding 参数为字符编码。如果省略,则使用内部字符编码。

返回值

返回具有 encoding 编码的字符串 str 包含的字符数。 多字节的字符被计为 1。

如果给定的 encoding 无效则返回 FALSE

参见

相关文章
php 多字节字符串 函数 检查字符串在指定的编码里是否有效php 多字节字符串 函数 get a specific characterphp 多字节字符串 函数 对字符串进行大小写转换php 多字节字符串 函数 转换字符的编码php 多字节字符串 函数 convert kana one from another zen kaku han kaku and more php 多字节字符串 函数 returns start point for next regular expression matchphp 多字节字符串 函数 retrieve the result from the last multibyte regular expression matchphp 多字节字符串 函数 setup string and regular expression for a multibyte regular expression matchphp 多字节字符串 函数 returns position and length of a matched part of the multibyte regular expression for a predefined multibyte stringphp 多字节字符串 函数 get code point of characterphp 多字节字符串 函数 在输出缓冲中转换字符编码的回调函数php 多字节字符串 函数 解析 get/post/cookie 数据并设置全局变量php 多字节字符串 函数 获取 mime 字符串php 多字节字符串 函数 获取字符串的长度php 多字节字符串 函数 大小写不敏感地查找指定字符在另一个字符串中最后一次的出现php 多字节字符串 函数 大小写不敏感地在字符串中查找一个字符串最后出现的位置php 多字节字符串 函数 查找字符串在一个字符串中最后出现的位置php 多字节字符串 函数 查找字符串在另一个字符串里的首次出现php 字符串 函数 转换字符串第一个字节为 0 255 之间的值php 字符串 函数 二进制安全比较字符串(从偏移位置比较指定长度)
关注编程学问公众号