Compare characters of two strings.
Compares up to num characters of the string str1 to those of the string str2.
- Parameters
-
str1 | A string to be compared. |
str2 | A string to be compared. |
num | The maximum number of characters to be compared. |
- Returns
- Returns an integral value indicating the relationship between the strings. A zero value indicates that the characters compared in both strings are all equal. A value greater than zero indicates that the first character that does not match has a greater value in str1 than in str2. A value less than zero indicates the opposite.
- Examples:
- ex_strncmp.nxc.