mb_stripos
Case de trouver insensible où une chaîne apparaît d'abord dans une autre chaîne
Nom de la fonction: MB_STRIPOS ()
Version applicable: PHP 4> = 4.2.0, Php 5, PHP 7
Fonction Description: La fonction MB_STRIPOS () recherche une autre chaîne (cas insensible). Semblable à la fonction stripos (), mais mb_stripos () prend en charge les caractères multilinants.
Syntaxe: MB_STRIPOS (String $ $ Haystack, String $ Needle, int $ offset = 0, String $ Encoding = MB_internal_encoding ()): int | false
paramètre:
Valeur de retour:
Exemple:
$haystack = "Hello, World!"; $needle = "world"; $position = mb_stripos($haystack, $needle); if ($position !== false) { echo "找到子字符串,位置为:" . $position; } else { echo "未找到子字符串"; }
Sortir:
找到子字符串,位置为:7
Notes: