定义和用法
stripos() 函数查找字符串在另一字符串中第一次出现的位置(不区分大小写)。
注释:stripos() 函数是不区分大小写的。
注释:该函数是二进制安全的。
相关函数:
- strpos() - 查找字符串在另一字符串中第一次出现的位置(区分大小写)
- strripos() - 查找字符串在另一字符串中最后一次出现的位置(不区分大小写)
- strrpos() - 查找字符串在另一字符串中最后一次出现的位置(区分大小写)
语法
stripos(string,find,start)
参数 |
描述 |
string |
必需。规定要搜索的字符串。 |
find |
必需。规定要查找的字符。 |
start |
可选。规定开始搜索的位置。 |
返回值
返回值: |
返回字符串在另一字符串中第一次出现的位置,如果没有找到字符串则返回 FALSE。
注释:字符串位置从 0 开始,不是从 1 开始。
|
PHP 版本: |
5+ |
实例
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn