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

Function IsTitleWord

util/charset/wide.cpp:134–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134bool IsTitleWord(const TWtringBuf text) noexcept {
135 if (!text) {
136 return false;
137 }
138
139 const auto* p = text.data();
140 const auto* pe = text.data() + text.size();
141
142 const auto firstSymbol = ReadSymbolAndAdvance(p, pe);
143 if (firstSymbol != ToTitle(firstSymbol)) {
144 return false;
145 }
146
147 return IsLowerWord({p, pe});
148}
149
150template <bool stopOnFirstModification, typename TCharType, typename F>
151static bool ModifySequence(TCharType*& p, const TCharType* const pe, F&& f) {

Callers 1

TestIsTitleStrMethod · 0.85

Calls 5

ReadSymbolAndAdvanceFunction · 0.85
IsLowerWordFunction · 0.85
ToTitleFunction · 0.70
dataMethod · 0.45
sizeMethod · 0.45

Tested by 1

TestIsTitleStrMethod · 0.68