Loading...
Select Version
&pagelevel(4)&pagelevel
Syntax | #include <string.h> int strncmp(const char *s1, const char *s2, size_t n); |
Description strncmp()
compares strings s1 and s2 lexically up to a maximum length of n, e.g.
returns 0 (equal), because the first three characters of both arguments match one another. | ||
Return val. | Integer value: | |
< 0 = 0 > 0 | In the first n characters, s1 is lexically less than s2. In the first n characters, s1 and s2 are lexically equal. In the first n characters, s1 is lexically greater than s2. | |
Notes | Strings terminated with the null byte ( The collating sequence is based on the EBCDIC character set. | |
See also |
|