MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / Join

Function Join

src/util/string.h:208–218  ·  view source on GitHub ↗

NOLINTNEXTLINE(misc-no-recursion)

Source from the content-addressed store, hash-verified

206template <typename C, typename S, typename UnaryOp>
207// NOLINTNEXTLINE(misc-no-recursion)
208auto Join(const C& container, const S& separator, UnaryOp unary_op)
209{
210 decltype(unary_op(*container.begin())) ret;
211 bool first{true};
212 for (const auto& item : container) {
213 if (!first) ret += separator;
214 ret += unary_op(item);
215 first = false;
216 }
217 return ret;
218}
219
220template <typename C, typename S>
221auto Join(const C& container, const S& separator)

Callers 15

FormatAllOutputTypesFunction · 0.85
~TorControllerMethod · 0.85
ParseGetInfoResultFunction · 0.85
LogLevelsStringMethod · 0.85
SetupServerArgsFunction · 0.85
UpdateTipMethod · 0.85
ActivateSnapshotMethod · 0.85
LogCategoriesStringMethod · 0.85
bitcoin-wallet.cppFile · 0.85
FormatSubVersionFunction · 0.85
blockfilter.cppFile · 0.85
LoadWalletsFunction · 0.85

Calls 1

beginMethod · 0.45

Tested by 7

InputAmountsToStringFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
FormatScriptFlagsFunction · 0.68
TestLogFromLocationFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
ConsumeArrayRPCArgumentFunction · 0.68
FUZZ_TARGETFunction · 0.68