MCPcopy Create free account
hub / github.com/avast/retdec / endsWith

Function endsWith

src/utils/string.cpp:669–672  ·  view source on GitHub ↗

* @brief Retruns @c true if @a str ends with the suffix @a withWhat, @c false * otherwise */

Source from the content-addressed store, hash-verified

667* otherwise
668*/
669bool endsWith(const std::string &str, const std::string &withWhat) {
670 return (str.length() >= withWhat.length()) &&
671 (str.compare(str.length() - withWhat.length(), withWhat.length(), withWhat) == 0);
672}
673
674/**
675* @brief Retruns @c true if @a str ends with the suffix @a withWhat, @c false

Callers 12

getTypeAwareNameForFunction · 0.85
LtiMethod · 0.85
fixPic32ManglingMethod · 0.85
getAllSignatureFilesFunction · 0.85
computeHashesMethod · 0.85
addFilePathsMethod · 0.85
getExternalDatabasesMethod · 0.85
populateInternalPathsMethod · 0.85
getAllSignaturesMethod · 0.85
getManifestHeuristicMethod · 0.85
TEST_FFunction · 0.85
emitSingleTokenMethod · 0.85

Calls 4

lengthMethod · 0.80
compareMethod · 0.80
emptyMethod · 0.45
backMethod · 0.45

Tested by 2

TEST_FFunction · 0.68
emitSingleTokenMethod · 0.68