字符串比较
>0 s1>s2 0 s1 = s2 <0 s1<s2
1.strcmp(char* s1, char* s2) 区分大小写
2.strncmp(char* s1,char* s2,int maxlen) 比较指定个数 区分大小写
3.stricmp(char* s1, char*s2) 不区分大小写
4.strnicmp(char*s1 , char* s2,int maxlen) 不区分大小写
本文共 262 字,大约阅读时间需要 1 分钟。
字符串比较
>0 s1>s2 0 s1 = s2 <0 s1<s2
1.strcmp(char* s1, char* s2) 区分大小写
2.strncmp(char* s1,char* s2,int maxlen) 比较指定个数 区分大小写
3.stricmp(char* s1, char*s2) 不区分大小写
4.strnicmp(char*s1 , char* s2,int maxlen) 不区分大小写
转载于:https://www.cnblogs.com/sinianxinfei/p/9202380.html