Compares part of two strings.
- Parameters
-
| str1 | Pointer to the null-terminated string to be compared. |
| str2 | Pointer to the null-terminated string to be compared. |
| n | Maximum number of characters to compare. |
- Returns
- This function returns zero if
n characters of two strings are identical, otherwise returns the difference between the first two differing characters.
This function compares not more than n characters (characters that follow a null byte are not compared) from the two strings str1 and str2, returning zero if they all match or the difference between the first two differing characters.