| 137 | // Join the keys and values of a map using the specified delimiters. |
| 138 | template<typename ITERATOR> |
| 139 | void JoinKeysAndValuesIterator(const ITERATOR& start, |
| 140 | const ITERATOR& end, |
| 141 | const StringPiece& intra_delim, |
| 142 | const StringPiece& inter_delim, |
| 143 | string *result) { |
| 144 | result->clear(); |
| 145 | for (ITERATOR iter = start; iter != end; ++iter) { |
| 146 | if (iter == start) { |
| 147 | StrAppend(result, iter->first, intra_delim, iter->second); |
| 148 | } else { |
| 149 | StrAppend(result, inter_delim, iter->first, intra_delim, iter->second); |
| 150 | } |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | template <typename ITERATOR> |
| 155 | string JoinKeysAndValuesIterator(const ITERATOR& start, |
no test coverage detected