strncmp

(PHP 4 >= 4.0.0)

strncmp --  Binßrn∞ bezpeΦnΘ porovnßnφ prvnφch n znak∙ v °et∞zcφch

Popis

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

This function is similar to strcmp(), with the difference that you can specify the (upper limit of the) number of characters (len) from each string to be used in the comparison. If any of the strings is shorter than len, then the length of that string will be used for 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.

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