MCPcopy Create free account
hub / github.com/alibaba/graph-learn / Join

Function Join

graphlearn/src/common/string/string_tool.cc:164–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164std::string Join(const std::vector<std::string>& v,
165 LiteString delim,
166 uint32_t from,
167 uint32_t to) {
168 int32_t size = v.size();
169 if (to > size) to = size;
170 if (from >= to) return "";
171
172 std::string s = v[from];
173 for (int32_t idx = from + 1; idx < to; ++idx) {
174 s.append(delim.data(), delim.size());
175 s.append(v[idx]);
176 }
177 return s;
178}
179
180} // namespace strings
181} // namespace graphlearn

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
appendMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected