Check for prefix. @return @c true if @a lhs is a prefix (ignoring case) of @a rhs.
| 382 | /// Check for prefix. |
| 383 | /// @return @c true if @a lhs is a prefix (ignoring case) of @a rhs. |
| 384 | inline bool |
| 385 | IsNoCasePrefixOf(std::string_view const &lhs, std::string_view const &rhs) |
| 386 | { |
| 387 | return lhs.size() <= rhs.size() && 0 == strncasecmp(lhs.data(), rhs.data(), lhs.size()); |
| 388 | } |
| 389 | |
| 390 | /// Check for prefix. |
| 391 | /// @return @c true if @a lhs is a prefix of @a rhs. |
no test coverage detected