iconv_strrpos() - iconv函数(字符编码转换库)
iconv_strrpos()
(PHP 5, PHP 7)
Finds the last occurrence of a needle within a haystack
说明
iconv_strrpos(string $haystack,string $needle[,string $charset= ini_get("iconv.internal_encoding")]): intFinds the last occurrence of a$needlewithin a$haystack.
In contrast to strrpos(), the return value of iconv_strrpos() is the number of characters that appear before the needle, rather than the offset in bytes to the position where the needle has been found. The characters are counted on the basis of the specified character set$charset.
参数
$haystackThe entire string.
$needleThe searched substring.
$charsetIf$charsetparameter is omitted,$stringare assumed to be encoded in iconv.internal_encoding.
If$haystackor$needleis not a string, it is converted to a string and applied as the ordinal value of a character.
返回值
Returns the numeric position of the last occurrence of$needlein$haystack.
If$needleis not found,iconv_strrpos() will return FALSE
.
此函数可能返回布尔值FALSE
,但也可能返回等同于FALSE
的非布尔值。请阅读布尔类型章节以获取更多信息。应使用===运算符来测试此函数的返回值。
参见
strrpos()
计算指定字符串在目标字符串中最后一次出现的位置iconv_strpos()
Finds position of first occurrence of a needle within a haystackmb_strrpos()
查找字符串在一个字符串中最后出现的位置
鹏仔微信 15129739599 鹏仔QQ344225443 鹏仔前端 pjxi.com 共享博客 sharedbk.com
图片声明:本站部分配图来自网络。本站只作为美观性配图使用,无任何非法侵犯第三方意图,一切解释权归图片著作权方,本站不承担任何责任。如有恶意碰瓷者,必当奉陪到底严惩不贷!