Skip to main content

Class: Str

A type that represents a fixed-length string.

Implements

Constructors

new Str()

new Str(byteLength: number): Str

Parameters

ParameterType

byteLength

number

Returns

Str

Defined in

types/str.ts:11

Methods

write()

write(writer: ByteStreamWriter, value: string): void

Writes the string to the buffer.

Parameters

ParameterTypeDescription

writer

ByteStreamWriter

The buffer writer.

value

string

The string to write.

Returns

void

Implementation of

Schema.write

Defined in

types/str.ts:26


read()

read(reader: ByteStreamReader): string

Reads the string from the buffer.

Parameters

ParameterTypeDescription

reader

ByteStreamReader

The buffer reader.

Returns

string

The string read from the buffer.

Implementation of

Schema.read

Defined in

types/str.ts:35

Properties

PropertyModifierTypeDefined in
byteLengthreadonlynumbertypes/str.ts:11