MCPcopy Create free account
hub / github.com/chen3feng/toft / JoinStrings

Function JoinStrings

base/string/algorithm.h:135–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133
134template <class InputIterator>
135void JoinStrings(InputIterator begin_iter,
136 InputIterator end_iter,
137 const StringPiece& delim,
138 std::string* result)
139{
140 for (InputIterator iter = begin_iter; iter != end_iter; ++iter)
141 {
142 if (iter != begin_iter)
143 {
144 result->append(delim.data(), delim.length());
145 }
146 result->append(iter->data(), iter->size());
147 }
148}
149
150template <class InputIterator>
151std::string JoinStrings(InputIterator begin_iter, InputIterator end_iter, const StringPiece& delim)

Callers 2

TESTFunction · 0.70
NormalizeMethod · 0.50

Calls 3

dataMethod · 0.80
lengthMethod · 0.45
sizeMethod · 0.45

Tested by 1

TESTFunction · 0.56