php strspn()函数 语法

php strspn()函数 语法

作用:返回字符串中包含某些字符的数目。大理石平台厂家

语法:strspn(string,charlist,start,length)

参数:

参数 描述
string  必需。规定被搜索的字符串。
charlist  必需。规定要查找的字符。
start 可选。规定在字符串的何处开始。
length 可选。定义字符串的长度。    

说明:返回在字符串中包含 charlist 参数中指定字符的数目。

php strspn()函数 示例

<?php
echo strspn("Hello world!","kHlleo");
?>
原文地址:https://www.cnblogs.com/furuihua/p/11898292.html