MCPcopy Create free account
hub / github.com/ElementsProject/elements / NextString

Function NextString

src/test/util/str.h:17–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15 */
16template <typename CharType, size_t StringLength>
17bool NextString(CharType (&string)[StringLength], CharType min_char, CharType max_char)
18{
19 for (CharType& elem : string) {
20 bool has_next = elem != max_char;
21 elem = elem < min_char || elem >= max_char ? min_char : CharType(elem + 1);
22 if (has_next) return true;
23 }
24 return false;
25}
26
27/**
28 * Iterate over string values and call function for each string without

Callers 1

ForEachNoDupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected