#include <stdio.h>
#include <ctype.h>
int stricmp(char const *s1, char const *s2) {
while (1) {
if (res != 0 || !*s1) return res;
s1++;
s2++;
}
}
int main(void) {
printf("%d\n", stricmp
("aaa", "AAA")); printf("%d\n", stricmp
("aaa", "aaa")); printf("%d\n", stricmp
("aaa", "AAB")); printf("%d\n", stricmp
("abb", "AAB")); }
//https://pt.stackoverflow.com/q/251861/101
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxjdHlwZS5oPgogCmludCBzdHJpY21wKGNoYXIgY29uc3QgKnMxLCBjaGFyIGNvbnN0ICpzMikgewogICB3aGlsZSAoMSkgewogICAgICAgIGludCByZXMgPSB0b2xvd2VyKCpzMSkgLSB0b2xvd2VyKCpzMik7CiAgICAgICAgaWYgKHJlcyAhPSAwIHx8ICEqczEpIHJldHVybiByZXM7CiAgICAgICAgczErKzsKICAgICAgICBzMisrOwogICAgfQp9CiAKaW50IG1haW4odm9pZCkgewoJcHJpbnRmKCIlZFxuIiwgc3RyaWNtcCgiYWFhIiwgIkFBQSIpKTsKCXByaW50ZigiJWRcbiIsIHN0cmljbXAoImFhYSIsICJhYWEiKSk7CglwcmludGYoIiVkXG4iLCBzdHJpY21wKCJhYWEiLCAiQUFCIikpOwoJcHJpbnRmKCIlZFxuIiwgc3RyaWNtcCgiYWJiIiwgIkFBQiIpKTsKfQoKLy9odHRwczovL3B0LnN0YWNrb3ZlcmZsb3cuY29tL3EvMjUxODYxLzEwMQ==