RichTextKit v0.4

Utf32Buffer.Add Method

Assembly: Topten.RichTextKit.dll
Namespace: Topten.RichTextKit.Utils
Declaring Type: Utf32Buffer

Overloads

Add(Slice<int>)

Appends utf32 data to this buffer

Add(string)

Appends text to this buffer, converting from UTF-16 to UTF-32

Add(ReadOnlySpan<char>)

Appends text to this buffer, converting from UTF-16 to UTF-32

Add(Slice<int>)
Add(int, bool)

Adds to the buffer, returning a slice of requested size

Add(Slice<int>)

Appends utf32 data to this buffer

public Slice<int> Add(Slice<int> data);

Parameters

Slice<int> data

The UTF32 data to be appended

Returns

Slice<int>

A slice representing the added UTF-32 data.

Add(string)

Appends text to this buffer, converting from UTF-16 to UTF-32

public Slice<int> Add(string str);

Parameters

string str

The string of text to be inserted

Returns

Slice<int>

A slice representing the added UTF-32 data.

Add(ReadOnlySpan<char>)

Appends text to this buffer, converting from UTF-16 to UTF-32

public Slice<int> Add(ReadOnlySpan<char> str);

Parameters

ReadOnlySpan<char> str

The string of text to be inserted

Returns

Slice<int>

A slice representing the added UTF-32 data.

Add(Slice<int>)

public Slice<int> Add(Slice<int> slice);

Parameters

Slice<int> slice

Returns

Slice<int>

Add(int, bool)

Adds to the buffer, returning a slice of requested size

public Slice<int> Add(int length, bool clear = true);

Parameters

int length

Number of elements to add

bool clear = true

True to clear the content; otherwise false

Returns

Slice<int>

A slice representing the allocated elements.