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 多字节字符串 函数 regular expression match for multibyte stringphp 多字节字符串 函数 perform a regular expression search and replace with multibyte support using a callbackphp 多字节字符串 函数 replace regular expression with multibyte supportphp 多字节字符串 函数 returns start point for next regular expression matchphp 多字节字符串 函数 retrieve the result from the last multibyte regular expression matchphp 多字节字符串 函数 设置/获取内部字符编码php 多字节字符串 函数 设置/获取当前的语言php 多字节字符串 函数 返回所有支持编码的数组php 多字节字符串 函数 get code point of characterphp 多字节字符串 函数 在输出缓冲中转换字符编码的回调函数php 多字节字符串 函数 获取字符串的长度php 多字节字符串 函数 查找字符串在另一个字符串中首次出现的位置php 多字节字符串 函数 查找指定字符在另一个字符串中最后一次的出现php 多字节字符串 函数 大小写不敏感地查找指定字符在另一个字符串中最后一次的出现php 多字节字符串 函数 大小写不敏感地在字符串中查找一个字符串最后出现的位置php 字符串 函数 使用另一个字符串填充字符串为指定长度php 字符串 函数 获取字符串长度php 多字节字符串 多字节字符串 函数
关注编程学问公众号