Returns true iff ch appears anywhere in str (excluding the terminating '\0' character).
| 10471 | // Returns true iff ch appears anywhere in str (excluding the |
| 10472 | // terminating '\0' character). |
| 10473 | bool IsInSet(char ch, const char* str) { |
| 10474 | return ch != '\0' && strchr(str, ch) != nullptr; |
| 10475 | } |
| 10476 | |
| 10477 | // Returns true iff ch belongs to the given classification. Unlike |
| 10478 | // similar functions in <ctype.h>, these aren't affected by the |
no outgoing calls
no test coverage detected