| 183 | } |
| 184 | |
| 185 | bool hasSuffix(const std::string_view& str, const char* term) { |
| 186 | auto termLength = strlen(term); |
| 187 | if (termLength > str.size()) { |
| 188 | return false; |
| 189 | } |
| 190 | |
| 191 | return str.compare(str.size() - termLength, termLength, term) == 0; |
| 192 | } |
| 193 | |
| 194 | } // namespace Valdi |