位置: 编程技术 - 正文
推荐整理分享PHP:iconv_strpos()的用法_iconv函数,希望有所帮助,仅作参考,欢迎阅读内容。
文章相关热门搜索词:,内容如对您有帮助,希望把文章链接给更多的朋友!
(PHP 5)
iconv_strpos — Finds position of first occurrence of a needle within a haystack
说明 int iconv_strpos ( string $haystack , string $needle [, int $offset = 0 [, string $charset = ini_get("iconv.internal_encoding") ]] )Finds position of first occurrence of a needle within a haystack.
In contrast to strpos(), the return value of iconv_strpos() 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.
参数haystack
The entire string.
needleThe searched substring.
offsetThe optional offset parameter specifies the position from which the search should be performed.
charsetIf charset parameter is omitted, string are assumed to be encoded in iconv.internal_encoding.
If haystack or needle is not a string, it is converted to a string and applied as the ordinal value of a character.
返回值Returns the numeric position of the first occurrence of needle in haystack.
If needle is not found, iconv_strpos() will return FALSE.
Warning此函数可能返回布尔值FALSE,但也可能返回等同于 FALSE 的非布尔值。请阅读 布尔类型章节以获取更多信息。应使用===运算符来测试此函数的返回值。
参见strpos() - 查找字符串首次出现的位置 iconv_strrpos() - Finds the last occurrence of a needle within a haystack mb_strpos() - 查找字符串在另一个字符串中首次出现的位置
PHP:iconv_mime_encode()的用法_iconv函数 iconv_mime_encode(PHP5)iconv_mime_encodeComposesaMIMEheaderfield说明stringiconv_mime_encode(string$field_name,string$field_value[,array$preferences=NULL])Composesandreturnsastringthatrepresentsavali
PHP:iconv_strlen()的用法_iconv函数 iconv_strlen(PHP5)iconv_strlen返回字符串的字符数统计说明inticonv_strlen(string$str[,string$charset=ini_get(iconv.internal_encoding)])和strlen()不同的是,iconv_strlen()统计了给
PHP:iconv_get_encoding()的用法_iconv函数 iconv_get_encoding(PHP4=4.0.5,PHP5)iconv_get_encoding获取iconv扩展的内部配置变量说明mixediconv_get_encoding([string$type=all])获取iconv扩展的内部配置变量。参数type选项type
标签: PHP:iconv_strpos()的用法_iconv函数
本文链接地址:https://www.jiuchutong.com/biancheng/285159.html 转载请保留说明!友情链接: 武汉网站建设