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

Method StripString

util/string/strip.h:85–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83
84 template <class T, class TStripCriterion>
85 static inline bool StripString(const T& from, T& to, TStripCriterion&& criterion) {
86 auto b = from.begin();
87 auto e = from.end();
88
89 if (StripRange(b, e, criterion)) {
90 if constexpr (::TIsTemplateBaseOf<std::basic_string_view, T>::value) {
91 to = T(b, e);
92 } else {
93 to.assign(b, e);
94 }
95
96 return true;
97 }
98
99 to = from;
100
101 return false;
102 }
103
104 template <class T, class TStripCriterion>
105 [[nodiscard]] static inline T StripString(const T& from, TStripCriterion&& criterion) {

Callers

nothing calls this directly

Calls 7

StripRangeFunction · 0.85
StripStringFunction · 0.85
IsAsciiSpaceAdapterFunction · 0.85
TClass · 0.70
beginMethod · 0.45
endMethod · 0.45
assignMethod · 0.45

Tested by

no test coverage detected