Skip to content

StringCodec Methods

Serializer for System.String.

ReadRaw(Reader<TInput>, uint)

static
View source
public static string ReadRaw<TInput>(ref Reader<TInput> reader, uint numBytes)
Reads the raw string content.

Parameters

readerReader<TInput>
numBytesuint
Encoded string length in bytes.

ReadValue(Reader<TInput>, Field)

static
View source
public static string ReadValue<TInput>(ref Reader<TInput> reader, Field field)
Reads a value.

Parameters

readerReader<TInput>
The reader.
fieldField
The field.

Returns

The value.

WriteField(Writer<TBufferWriter>, uint, string)

static
View source
public static void WriteField<TBufferWriter>(ref Writer<TBufferWriter> writer, uint fieldIdDelta, string value)
Writes a field without type info (expected type is statically known).

Parameters

writerWriter<TBufferWriter>
The writer.
fieldIdDeltauint
The field identifier delta.
valuestring
The value.

WriteRaw(Writer<TBufferWriter>, string, int)

static
View source
public static void WriteRaw<TBufferWriter>(ref Writer<TBufferWriter> writer, string value, int numBytes)
Writes the raw string content.

Parameters

writerWriter<TBufferWriter>
valuestring
String to be encoded.
numBytesint
Encoded string length in bytes.