MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / endsWith

Function endsWith

src/Core/Utils/StringUtils.cpp:137–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135 }
136
137 bool endsWith(const std::string& string, const std::string& search)
138 {
139 if (string.size() < search.size())
140 {
141 return false;
142 }
143 return (std::mismatch(search.rbegin(), search.rend(), string.rbegin()).first
144 == search.rend());
145 }
146
147 std::size_t distance(std::string_view source, std::string_view target)
148 {

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
rbeginMethod · 0.45
rendMethod · 0.45

Tested by

no test coverage detected