MCPcopy Create free account
hub / github.com/apache/kvrocks / StringJoin

Function StringJoin

src/common/string_util.h:68–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66
67template <typename T, typename F, std::enable_if_t<std::is_invocable_v<F, typename T::value_type>, int> = 0>
68std::string StringJoin(const T &con, F &&f, std::string_view sep = ", ") {
69 std::string res;
70 bool is_first = true;
71 for (const auto &v : con) {
72 if (is_first) {
73 is_first = false;
74 } else {
75 res += sep;
76 }
77 res += std::forward<F>(f)(v);
78 }
79 return res;
80}
81
82template <typename T>
83std::string StringJoin(const T &con, std::string_view sep = ", ") {

Callers 15

DumpMethod · 0.85
DumpMethod · 0.85
DumpMethod · 0.85
DumpMethod · 0.85
RowTypeClass · 0.85
ContentMethod · 0.85
ContentMethod · 0.85
DumpMethod · 0.85
DumpMethod · 0.85
ToStringMethod · 0.85
ToStringMethod · 0.85
GetCpuInfoMethod · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68