Comando strieql
Exemplo de como usar este comando em C.
Descrição
Exemplo de como usar este comando em C.
#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("Testando Abc e Abc %d\n", strieql("Abc",
"Abc"));
printf("Testando abc e Abc %d\n", strieql("abc",
"Abc"));
printf("Testando abcd e abc %d\n", strieql("abcd",
"abc"));
}