| 198 | |
| 199 | template <class TRange, class TFormatter> |
| 200 | void FormatRange(TStringBuilderBase* builder, const TRange& range, const TFormatter& formatter, size_t limit = std::numeric_limits<size_t>::max()) |
| 201 | { |
| 202 | builder->AppendChar('['); |
| 203 | size_t index = 0; |
| 204 | for (const auto& item : range) { |
| 205 | if (index > 0) { |
| 206 | builder->AppendString(DefaultJoinToStringDelimiter); |
| 207 | } |
| 208 | if (index == limit) { |
| 209 | builder->AppendString(DefaultRangeEllipsisFormat); |
| 210 | break; |
| 211 | } |
| 212 | formatter(builder, item); |
| 213 | ++index; |
| 214 | } |
| 215 | builder->AppendChar(']'); |
| 216 | } |
| 217 | |
| 218 | //////////////////////////////////////////////////////////////////////////////// |
| 219 |
no test coverage detected