strcasecmp

strcasecmp -- Binárně bezpečné case-insensitive porovnání řetězců

Popis

int strcasecmp ( string str1, string str2)

Pokud je str1 méně než str2 vrací 0 ; pokud je str1 větší než str2 vrací 0 , a 0 , pokud jsou stejné .

Příklad 1 . Ukázka strcasecmp( )

 
$var1

 
=

 
"

 
Hello"

 
;

 
$var2

 
=

 
"hello"

 
;

 
if

 
(!strcasecmp

 
($var1

 
,

 
$var2)

 
)

 
{

 
echo

 
'v

 
case-insensitive

 
textovém

 
porovnání

 
se

 
$var1

 
rovná

 
$var2'

 
;

 
}





Viz také : ereg( ) , strcmp( ) , substr( ) , stristr( ) , strncasecmp( ) a strstr( ) .