(PHP 5 >= 5.2.0, PHP 7, PHP 8)
mb_strstr — 查找字符串在另一个字符串里的首次出现
$haystack
,$needle
,$before_needle
= false
,$encoding
= null
mb_strstr() 查找了 needle
在 haystack
中首次的出现并返回 haystack
的一部分。
如果 needle
没有找到,它将返回 false
。
返回 haystack
的一部分,或者 needle
没找到则返回 false
。
版本 | 说明 |
---|---|
8.0.0 |
现在 needle 接受空字符串。
|
8.0.0 |
现在 encoding 可以为 null。
|
Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!
Check out: eBank.nz (Art Generator) |
Netwrck.com (AI Tools) |
Text-Generator.io (AI API) |
BitBank.nz (Crypto AI) |
ReadingTime (Kids Reading) |
RewordGame |
BigMultiplayerChess |
WebFiddle |
How.nz |
Helix AI Assistant