Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <ctype.h>
- int
- mystrspccmp(const char *str1, const char *str2)
- {
- while (isspace(*str1) || isspace(*str2) || *str1 != 0 && *str2 != 0) {
- if (isspace(*str1)) {
- ++str1;
- } else if (isspace(*str2)) {
- ++str2;
- } else if (*str1 == *str2) {
- ++str1;
- ++str2;
- }
- }
- return (unsigned char) *str1 - (unsigned char) *str2;
- }
Advertisement
Add Comment
Please, Sign In to add comment