strspn 函数 实例教程
定义和用法
该strspn ()函数返回的字符数中找到字符串只包含字符从charlist 。
语法
strspn(string,charlist,start,length)
参数
说明
string:必需。指定字符串搜索
charlist:要求。指定的字符找到
start:任择。凡在指定的字符串开始
length:可选。规定长度的字符串提示和说明注:此功能是二进制的安全。
范例1
echo strspn("Hello world!","kHlleo");
?>
结果为:5
再来看一个strspn教程.
echo strspn("abcdefand","abc");
?>
结果为3
本文地址:http://www.phprm.com/function/php1004460.html
转载随意,但请附上文章地址:-)
- 上一篇: php file_get_contents函数
- 下一篇: PHP header 函数教程