We do not want to cast every signed char to unsigned when passing to isalpha, so we implement the replacement. Shall work for Unicode too. If chars are signed, conversion from char to int could generate negative values, resulting in undefined behavior in standard function.
| 191 | // If chars are signed, conversion from char to int could generate negative |
| 192 | // values, resulting in undefined behavior in standard function. |
| 193 | bool IsAlpha(int ch) |
| 194 | { |
| 195 | return ch>='A' && ch<='Z' || ch>='a' && ch<='z'; |
| 196 | } |
| 197 | |
| 198 | |
| 199 |
nothing calls this directly
no outgoing calls
no test coverage detected