case_starts.c (299B)
1 #include "case.h" 2 3 int case_starts(char *s, char *t) 4 { 5 unsigned char x; 6 unsigned char y; 7 8 for (;;) { 9 x = *s++ - 'A'; 10 if (x <= 'Z' - 'A') x += 'a'; else x += 'A'; 11 y = *t++ - 'A'; 12 if (y <= 'Z' - 'A') y += 'a'; else y += 'A'; 13 if (!y) return 1; 14 if (x != y) return 0; 15 } 16 }