strncmp()函数

strncmp

语法:

功能:比较字符串str1str2中至多count个字符。返回值如下:

返回值??????????????????????????????? 解释

less than 0????????????? str1 is less than str2

equal to 0?????????????? str1 is equal to str2

greater than 0????? str1 is greater than str2

如果参数中任一字符串长度小于count, 那么当比较到第一个空值结束符时,就结束处理。