c/string/byte/strncmp

Compares at most characters of two possibly null-terminated arrays. The comparison is done lexicographically. Characters following the null character are not compared.

The sign of the result is the sign of the difference between the values of the first pair of characters (both interpreted as ) that differ in the arrays being compared.

The behavior is undefined when access occurs past the end of either array or. The behavior is undefined when either or  is the null pointer.

Return value
Negative value if appears before  in lexicographical order.

Zero if and  compare equal, or if count is zero.

Positive value if appears after  in lexicographical order.