| 200 | } |
| 201 | |
| 202 | inline bool startWith(std::string_view _source, std::string_view _value) |
| 203 | { |
| 204 | #if __cplusplus >= 202002L |
| 205 | return _source.starts_with(_value); |
| 206 | #else |
| 207 | size_t count = _value.size(); |
| 208 | if (_source.size() < count) |
| 209 | return false; |
| 210 | for (size_t index = 0; index < count; ++index) |
| 211 | { |
| 212 | if (_source[index] != _value[index]) |
| 213 | return false; |
| 214 | } |
| 215 | return true; |
| 216 | #endif |
| 217 | } |
| 218 | |
| 219 | inline bool endWith(std::string_view _source, std::string_view _value) |
| 220 | { |
no test coverage detected