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

Function WriteString

util/stream/output.cpp:76–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74
75template <typename TCharType>
76static void WriteString(IOutputStream& o, const TCharType* w, size_t n) {
77 const size_t buflen = (n * MAX_UTF8_BYTES); // * 4 because the conversion functions can convert unicode character into maximum 4 bytes of UTF8
78 TTempBuf buffer(buflen + 1);
79 size_t written = 0;
80 WideToUTF8(w, n, buffer.Data(), written);
81 o.Write(buffer.Data(), written);
82}
83
84template <>
85void Out<TString>(IOutputStream& o, const TString& p) {

Callers 12

wstring>Method · 0.70
u16string>Method · 0.70
u32string>Method · 0.70
wstring_view>Method · 0.70
u16string_view>Method · 0.70
u32string_view>Method · 0.70
Out<TWtringBuf>Function · 0.70
Out<TUtf32StringBuf>Function · 0.70
Out<const wchar16*>Function · 0.70
Out<const wchar32*>Function · 0.70
Out<TUtf16String>Function · 0.70
Out<TUtf32String>Function · 0.70

Calls 3

WideToUTF8Function · 0.85
DataMethod · 0.45
WriteMethod · 0.45

Tested by

no test coverage detected