| 132 | } |
| 133 | |
| 134 | bool 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 | |
| 150 | template <bool stopOnFirstModification, typename TCharType, typename F> |
| 151 | static bool ModifySequence(TCharType*& p, const TCharType* const pe, F&& f) { |