| 880 | } |
| 881 | |
| 882 | bool Str::cStringCaseEq(const char* s1, const char* s2) { |
| 883 | if (s1 == nullptr && s2 == nullptr) return true; |
| 884 | if (s1 == nullptr || s2 == nullptr) return false; |
| 885 | |
| 886 | // With thanks to cygwin for this code |
| 887 | int d = 0; |
| 888 | |
| 889 | while (true) { |
| 890 | const int c1 = toupper(*s1++); |
| 891 | const int c2 = toupper(*s2++); |
| 892 | |
| 893 | if (((d = c1 - c2) != 0) || (c2 == '\0')) { |
| 894 | break; |
| 895 | } |
| 896 | } |
| 897 | |
| 898 | return d == 0; |
| 899 | } |
| 900 | |
| 901 | bool Str::contains(const char* str, char c) { |
| 902 | for (; *str; ++str) { |
nothing calls this directly
no outgoing calls
no test coverage detected