strieql.c
来自「C程序的典型例子900个」· C语言 代码 · 共 21 行
C
21 行
#include <stdio.h>
#include <ctype.h>
int strieql(char *str1, char *str2)
{
while ((toupper(*str1) == toupper(*str2)) && (*str1))
{
str1++;
str2++;
}
return((*str1 == NULL) && (*str2 == NULL));
}
void main(void)
{
printf("Testing Abc and Abc %d\n", strieql("Abc", "Abc"));
printf("Testing abc and Abc %d\n", strieql("abc", "Abc"));
printf("Testing abcd and abc %d\n", strieql("abcd", "abc"));
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?