Returns true iff ch appears anywhere in str (excluding the terminating '\0' character).
| 8411 | // Returns true iff ch appears anywhere in str (excluding the |
| 8412 | // terminating '\0' character). |
| 8413 | bool IsInSet(char ch, const char* str) { |
| 8414 | return ch != '\0' && strchr(str, ch) != NULL; |
| 8415 | } |
| 8416 | |
| 8417 | // Returns true iff ch belongs to the given classification. Unlike |
| 8418 | // similar functions in <ctype.h>, these aren't affected by the |
no outgoing calls
no test coverage detected