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

Function SplitStringImplT

util/string/vector.cpp:49–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47
48template <typename TChr>
49static void SplitStringImplT(TVector<std::conditional_t<std::is_same<TChr, wchar16>::value, TUtf16String, TString>>* res,
50 const TBasicStringBuf<TChr> str, const TChr* delim, size_t maxFields, int options) {
51 if (!*delim) {
52 return;
53 }
54
55 if (*(delim + 1)) {
56 TStringDelimiter<const TChr> d(delim, std::char_traits<TChr>::length(delim));
57
58 DoSplit0(res, str, d, maxFields, options);
59 } else {
60 TCharDelimiter<const TChr> d(*delim);
61
62 DoSplit0(res, str, d, maxFields, options);
63 }
64}
65
66void ::NPrivate::SplitStringImpl(TVector<TString>* res, const char* ptr, const char* delim, size_t maxFields, int options) {
67 return SplitStringImplT<char>(res, TStringBuf(ptr), delim, maxFields, options);

Callers

nothing calls this directly

Calls 2

DoSplit0Function · 0.85
lengthFunction · 0.50

Tested by

no test coverage detected