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

Function hasOnlyDecimalDigits

src/utils/string.cpp:227–230  ·  view source on GitHub ↗

* @brief Returns @c true if the given string is formed only by decimal digits. * * The empty string is considered to be composed only by digits. */

Source from the content-addressed store, hash-verified

225* The empty string is considered to be composed only by digits.
226*/
227bool hasOnlyDecimalDigits(const std::string &str) {
228 return std::all_of(str.begin(), str.end(),
229 [](const unsigned char c) { return std::isdigit(c); });
230}
231
232/**
233* @brief Returns @c true if the given string is formed only by hexadecimal

Callers 3

getAddressFromNameFunction · 0.85
getOffsetFromNameFunction · 0.85
TEST_FFunction · 0.85

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by 1

TEST_FFunction · 0.68