MCPcopy Create free account
hub / github.com/Predelnik/DSpellCheck / ends_with_helper

Function ends_with_helper

src/common/string_utils.h:102–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100
101namespace detail {
102template <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
110template <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()) {

Callers 1

ends_withFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected