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

Function DetachAndFixPointers

util/charset/wide.cpp:190–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188
189template <class TStringType>
190static void DetachAndFixPointers(TStringType& text, typename TStringType::value_type*& p, const typename TStringType::value_type*& pe) {
191 const auto pos = p - text.data();
192 const auto count = pe - p;
193 p = text.Detach() + pos;
194 pe = p + count;
195}
196
197template <class TStringType, typename F>
198static bool ModifyStringSymbolwise(TStringType& text, size_t pos, size_t count, F&& f) {

Callers 2

ModifyStringSymbolwiseFunction · 0.70
ToTitleFunction · 0.70

Calls 2

dataMethod · 0.45
DetachMethod · 0.45

Tested by

no test coverage detected