📄 strncmpi.c
字号:
#include <string.h>
#include <stdio.h>
void main(void)
{
char *buf1 = "MADE IN korea";
char *buf2 = "made in chosun";
int result;
result=strcmp(buf2, buf1);
if (result!=0)
printf("buf1 and buf2 are not same by strcmp\n");
else
printf("buf1 and buf2 are same by strcmp\n");
result=strncmpi(buf2, buf1,8);
if (result!=0)
printf("buf1 and buf2 are not same by strncmpi\n");
else
printf("buf1 and buf2 are same by strncmpi\n");
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -