c语言把串中的一部分与另一串中的一部分比较, 不管大小写函数
来源:百度文库 编辑:神马文学网 时间:2024/10/04 04:02:06
函数名: strncmpi
功 能: 把串中的一部分与另一串中的一部分比较, 不管大小写
用 法: int strncmpi(char *str1, char *str2);
程序例:
#include
#include
int main(void)
{
char *buf1 = "BBBccc", *buf2 = "bbbccc";
int ptr;
ptr = strncmpi(buf2,buf1,3);
if (ptr > 0)
printf("buffer 2 is greater than buffer 1\n");
if (ptr < 0)
printf("buffer 2 is less than buffer 1\n");
if (ptr == 0)
printf("buffer 2 equals buffer 1\n");
return 0;
}
功 能: 把串中的一部分与另一串中的一部分比较, 不管大小写
用 法: int strncmpi(char *str1, char *str2);
程序例:
#include
#include
int main(void)
{
char *buf1 = "BBBccc", *buf2 = "bbbccc";
int ptr;
ptr = strncmpi(buf2,buf1,3);
if (ptr > 0)
printf("buffer 2 is greater than buffer 1\n");
if (ptr < 0)
printf("buffer 2 is less than buffer 1\n");
if (ptr == 0)
printf("buffer 2 equals buffer 1\n");
return 0;
}
c语言把串中的一部分与另一串中的一部分比较, 不管大小写函数
c语言不注重大小写地比较两个串函数
c语言中以大小写不敏感方式比较两个串函数
c语言中串比较函数
C语言中的break
c语言中串拷贝函数
解析C语言中的sizeof
解析C语言中的sizeof
C语言中的多级指针
一部分理财杂志与网站
crypt函数salt如何取值才能得到和shadow中的密码串一致? - C/C++ - ...
C ++中的虚函数(virtual function)
C 中的虚函数(virtual function)
C/C++中的函数参数传递机制
C 中的虚函数(virtual function)
C/C++中的函数参数传递机制
C语言函数入栈顺序与可变参数函数
笔记本已经越来越多的被普通老百姓所接受,成为了人们生活中的一部分。
C语言中的折半查找法是什么
前一部分
一部分理财杂志与网站1
一部分理财杂志与网站2
OO in C-C语言中的面向对象思想
C语言字符串函数大全