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

Function hasSubstringOnPosition

src/utils/string.cpp:703–707  ·  view source on GitHub ↗

* @brief Returns @c true if @a str has substring @a withWhat on index * @a position. */

Source from the content-addressed store, hash-verified

701* @a position.
702*/
703bool hasSubstringOnPosition(const std::string &str,
704 const std::string &withWhat, std::string::size_type position) {
705 return (position < str.length()) && (str.length() - position >= withWhat.length()) &&
706 (str.compare(position, withWhat.length(), withWhat) == 0);
707}
708
709/**
710* @brief Returns @c true if @a str has substring @a withWhat in area

Callers 4

detectFileFormatFunction · 0.85
getRelativeJumpMethod · 0.85
hasStringMethod · 0.85
TEST_FFunction · 0.85

Calls 2

lengthMethod · 0.80
compareMethod · 0.80

Tested by 1

TEST_FFunction · 0.68