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

Function Join

src/util/string.h:45–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43 */
44template <typename T, typename BaseType, typename UnaryOp>
45auto Join(const std::vector<T>& list, const BaseType& separator, UnaryOp unary_op)
46 -> decltype(unary_op(list.at(0)))
47{
48 decltype(unary_op(list.at(0))) ret;
49 for (size_t i = 0; i < list.size(); ++i) {
50 if (i > 0) ret += separator;
51 ret += unary_op(list.at(i));
52 }
53 return ret;
54}
55
56template <typename T>
57T Join(const std::vector<T>& list, const T& separator)

Callers 15

ParseGetInfoResultFunction · 0.85
SetupServerArgsFunction · 0.85
GetWarningsFunction · 0.85
LogCategoriesStringMethod · 0.85
mainFunction · 0.85
LoadWalletsFunction · 0.85
restorewalletFunction · 0.85
loadwalletFunction · 0.85
createwalletFunction · 0.85
unloadwalletFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
ConsumeArrayRPCArgumentFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by 3

BOOST_AUTO_TEST_CASEFunction · 0.68
ConsumeArrayRPCArgumentFunction · 0.68
FUZZ_TARGETFunction · 0.68