MCPcopy Create free account
hub / github.com/catboost/catboost / ConvertToStrings

Function ConvertToStrings

library/cpp/yt/string/string-inl.h:102–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100//! Converts a range of items into strings.
101template <std::forward_iterator TIter, class TFormatter>
102std::vector<TString> ConvertToStrings(
103 const TIter& begin,
104 const TIter& end,
105 const TFormatter& formatter,
106 size_t maxSize)
107{
108 std::vector<TString> result;
109 for (auto it = begin; it != end; ++it) {
110 TStringBuilder builder;
111 formatter(&builder, *it);
112 result.push_back(builder.Flush());
113 if (result.size() == maxSize) {
114 break;
115 }
116 }
117 return result;
118}
119
120//! A handy shortcut with the default formatter.
121template <std::forward_iterator TIter>

Callers

nothing calls this directly

Calls 7

TDefaultFormatterClass · 0.85
formatterFunction · 0.50
beginFunction · 0.50
endFunction · 0.50
push_backMethod · 0.45
FlushMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected