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

Function Split

util/string/split.cpp:4–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2
3template <class TValue>
4inline size_t Split(const char* ptr, const char* delim, TVector<TValue>& values) {
5 values.erase(values.begin(), values.end());
6 while (ptr && *ptr) {
7 ptr += strspn(ptr, delim);
8 if (ptr && *ptr) {
9 size_t epos = strcspn(ptr, delim);
10 assert(epos);
11 values.push_back(TValue(ptr, epos));
12 ptr += epos;
13 }
14 }
15 return values.size();
16}
17
18size_t Split(const char* ptr, const char* delim, TVector<TString>& values) {
19 return Split<TString>(ptr, delim, values);

Callers

nothing calls this directly

Calls 7

TValueClass · 0.50
eraseMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected