| 100 | |
| 101 | namespace detail { |
| 102 | template <typename CharType> bool ends_with_helper(std::basic_string_view<CharType> const &target, std::basic_string_view<CharType> const &suffix) { |
| 103 | if (target.length() >= suffix.length()) { |
| 104 | return (0 == target.compare(target.length() - suffix.length(), suffix.length(), suffix)); |
| 105 | } else { |
| 106 | return false; |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | template <typename CharType> bool starts_with_helper(std::basic_string_view<CharType> const &target, std::basic_string_view<CharType> const &prefix) { |
| 111 | if (target.length() >= prefix.length()) { |