Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int isLetter(int *c){
- static int upperLowerDiff = 'a' - 'A';
- //A-Z: make lower-case and return 1
- if (*c <= 'Z' && *c >= 'A'){
- #ifndef CASE_SENSITIVE
- *c += upperLowerDiff;
- #endif
- return 1;
- }
- //a-z, apostrophe: return 1
- if (*c >= 'a' && *c <= 'z' || *c == '\'')
- return 1;
- //non-letter: return 0
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement