strncmp


]Podporované v PHP 4, PHP 5 

PHP -> Funkcie -> Funkcie pre prácu s reťazcami PHP -> strncmp

Syntax

int strncmp ( string $str1, string $str2, int $len )

Popis

Príkaz jazyka PHP
Binárně bezpečné porovnání prvních n znaků v řetězcích

This function is similar to strcmp, with the difference that you can specify the (upper limit of the) number of characters from each string to be used in the comparison.

Vrací < 0 pokud je str1 menší než str2; > 0 pokud je str1 větší než str2, a 0 pokud jsou shodné.

Pozn.: toto srovnání je case-sensitive.

Pozri aj

ereg, strncasecmp, strcasecmp, substr, stristr, strcmp, strstr

]