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

Function UnescapeC

util/string/escape.cpp:339–359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337
338template <class TChar>
339TChar* UnescapeC(const TChar* str, size_t len, TChar* buf) {
340 struct TUnboundedString {
341 void append(TChar ch) noexcept {
342 *P++ = ch;
343 }
344
345 void append(const TChar* b, const TChar* e) noexcept {
346 while (b != e) {
347 append(*b++);
348 }
349 }
350
351 void AppendNoAlias(const TChar* s, size_t l) noexcept {
352 append(s, s + l);
353 }
354
355 TChar* P;
356 } bufbuf = {buf};
357
358 return DoUnescapeC(str, len, bufbuf).P;
359}
360
361template TString& UnescapeCImpl<TString::TChar>(const TString::TChar* str, size_t len, TString& r);
362template TUtf16String& UnescapeCImpl<TUtf16String::TChar>(const TUtf16String::TChar* str, size_t len, TUtf16String& r);

Callers 1

escape.cppFile · 0.70

Calls 2

dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected