MCPcopy Create free account
hub / github.com/cinder/Cinder / endsWith

Function endsWith

test/unit/src/catch.hpp:13827–13829  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13825 return !s.empty() && s[0] == prefix;
13826 }
13827 bool endsWith( std::string const& s, std::string const& suffix ) {
13828 return s.size() >= suffix.size() && std::equal(suffix.rbegin(), suffix.rend(), s.rbegin());
13829 }
13830 bool endsWith( std::string const& s, char suffix ) {
13831 return !s.empty() && s[s.size()-1] == suffix;
13832 }

Callers 4

matchMethod · 0.85
addMethod · 0.85
WildcardPatternMethod · 0.85
matchesMethod · 0.85

Calls 5

rbeginMethod · 0.80
rendMethod · 0.80
equalFunction · 0.50
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected