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

Method WriteStringScalar

library/cpp/yson/writer.cpp:205–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203 }
204
205 void TYsonWriter::WriteStringScalar(const TStringBuf& value) {
206 if (Format == EYsonFormat::Binary) {
207 Stream->Write(NDetail::StringMarker);
208 WriteVarInt32(Stream, static_cast<i32>(value.length()));
209 Stream->Write(value.begin(), value.length());
210 } else {
211 Stream->Write('"');
212 EscapeC(value.data(), value.length(), *Stream);
213 Stream->Write('"');
214 }
215 }
216
217 void TYsonWriter::OnStringScalar(TStringBuf value) {
218 WriteStringScalar(value);

Callers

nothing calls this directly

Calls 6

WriteVarInt32Function · 0.70
EscapeCFunction · 0.70
WriteMethod · 0.45
lengthMethod · 0.45
beginMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected