Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int match(char *s1, char *s2)
- {
- if ((*s1 == '\0') && (*s1 == '\0') && (*s1 == *s2))
- return (1);
- if ((*s1 != '\0') && (*s2 == '*'))
- return (match(++s1, s2) || match(s1, ++s2));
- if ((*s1 == '\0') && (*s2 == '*'))
- return (match(s1, ++s2));
- if (*s1 == *s2)
- return (match(++s1, ++s2));
- else
- return (0);
- }
Advertisement
Add Comment
Please, Sign In to add comment