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

Function isComposedOnlyOfChars

src/utils/string.cpp:732–734  ·  view source on GitHub ↗

* @brief Returns @c true if @a str is composed solely of chars in @a chars, @c * false otherwise. * * If @a chars is the empty string, it returns @c false. */

Source from the content-addressed store, hash-verified

730* If @a chars is the empty string, it returns @c false.
731*/
732bool isComposedOnlyOfChars(const std::string &str, const std::string &chars) {
733 return str.find_first_not_of(chars) == std::string::npos;
734}
735
736/**
737* @brief Returns @c true if @a str is composed solely of char @a c, @c false

Callers 4

isComposedOnlyOfStringsFunction · 0.85
isMoreReadableInHexaMethod · 0.85
TEST_FFunction · 0.85

Calls

no outgoing calls

Tested by 1

TEST_FFunction · 0.68