| 30 | } |
| 31 | |
| 32 | int strncasecmp(const char *str0, const char *str1, std::size_t len) noexcept |
| 33 | { |
| 34 | if(len > 0) |
| 35 | { |
| 36 | do { |
| 37 | const int diff{to_upper(*str0) - to_upper(*str1)}; |
| 38 | if(diff < 0) return -1; |
| 39 | if(diff > 0) return 1; |
| 40 | } while(--len && *(str0++) && *(str1++)); |
| 41 | } |
| 42 | return 0; |
| 43 | } |
| 44 | |
| 45 | } // namespace al |
no test coverage detected