MCPcopy Create free account
hub / github.com/FidoProject/Fido / endsWith

Function endsWith

tests/catch.h:7740–7742  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7738 return s.size() >= prefix.size() && s.substr( 0, prefix.size() ) == prefix;
7739 }
7740 bool endsWith( std::string const& s, std::string const& suffix ) {
7741 return s.size() >= suffix.size() && s.substr( s.size()-suffix.size(), suffix.size() ) == suffix;
7742 }
7743 bool contains( std::string const& s, std::string const& infix ) {
7744 return s.find( infix ) != std::string::npos;
7745 }

Callers 4

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

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected