Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: iconv_strpos - Manual
[go: Go Back, main page]

PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

iconv_strrpos" width="11" height="7"/> <iconv_strlen
Last updated: Mon, 05 Feb 2007

view this page in

iconv_strpos

(PHP 5)

iconv_strpos — 文字列が最初に現れる場所を見つける

説明

int iconv_strpos ( string haystack, string needle [, int offset [, string charset]] )

needle が haystack の中で最初に現れる位置を探します。

strpos() の返り値は needle が見つかった位置の 先頭からのバイト数でしたが、それとは異なり iconv_strpos() の返り値は needle が見つかった 位置の先頭からの文字数となります。文字数は charset で指定された文字セットに基づいて 数えられます。

パラメータ

haystack

文字列全体。

needle

検索する文字列。

offset

オプションの offset パラメータは 検索を開始する位置を指定します。

charset

charset パラメータが指定されなかった場合、 string のエンコードは iconv.internal_charset であると判断されます。

haystackneedle が文字列でない場合、文字列に変換され、文字が並んだ値として適用されます。

返り値

needlehaystack の中で最初に現れる位置を探します。

もし needle が見つからなかった場合、 iconv_strpos()FALSE を返します。

警告
この関数は論理値 FALSE を返す可能性がありますが、FALSE として評価される 0 や "" といった値を返す可能性もあります。 詳細については 論理値の セクションを参照してください。この関数の返り値を調べるには ===演算子 を 使用してください。

参考

strpos()
iconv_strrpos()
mb_strpos()



add a note add a note User Contributed Notes
iconv_strpos
There are no user contributed notes for this page.

iconv_strrpos" width="11" height="7"/> <iconv_strlen
Last updated: Mon, 05 Feb 2007
 
 
show source | credits | sitemap | contact | advertising | mirror sites