Skip to main content

Class: Text

A type that represents a string of text.

Implements

Constructors

new Text()

new Text(maxByteLength: number): Text

Creates a new text type.

Parameters

ParameterTypeDescription

maxByteLength

number

The maximum byte length of the encoded string

Returns

Text

Defined in

types/text.ts:34

Methods

write()

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

Writes the string to the buffer.

Parameters

ParameterTypeDescription

value

string

The string to write.

writer

BufferWriter

The buffer writer.

Returns

void

Implementation of

BaseType.write

Defined in

types/text.ts:43


read()

read(reader: BufferReader): string

Reads the string from the buffer.

Parameters

ParameterTypeDescription

reader

BufferReader

The buffer reader.

Returns

string

The string read from the buffer.

Implementation of

BaseType.read

Defined in

types/text.ts:59