Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int strcmpx(unsigned char s1[], unsigned char s2[])
- {
- int i;
- for (i = 0; ; i++) {
- if ((i >= strlen(s1)) && i < strlen(s2)) return -1;
- if ((i >= strlen(s2)) && i < strlen(s1)) return 1;
- if ((i >= strlen(s2)) && i >= strlen(s1)) return 0;
- if (s1[i] - s2[i] != 0) return s1[i] - s2[i];
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment