RichTextKit v0.1

Utf32Buffer Class

Assembly: Topten.RichTextKit.dll
Namespace: Topten.RichTextKit.Utils

Represents a buffer of UTF-32 encoded code point data

public class Utf32Buffer : Buffer<int>,
    IEnumerable<int>

Inheritance

Utf32Buffer → Buffer<T>object

Interfaces

IEnumerable<int>, System.Collections.IEnumerable

Constructors

Utf32Buffer()

Constructs a new Utf32Buffer

Utf32Buffer(string)

Constructs a Utf32 buffer with an initial string

Methods

Add(string)

Adds text to this buffer, converting from UTF-16 to UTF-32 and normalizing line endings to \n.

Clear()

Clears this buffer.

GetString()

Gets the enture buffer's content as a string.

GetString(int, int)

Gets a part of the buffer as a string.

Utf16OffsetToUtf32Offset(int)

Converts an offset in the original UTF-16 string, a code point index into this UTF-32 buffer.

Utf32OffsetToUtf16Offset(int)

Convers an offset into this buffer to a UTF-16 offset in the originally added string.

Overridden & Inherited

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

Adds to the buffer, returning a slice of requested size

AsSlice()

Returns the entire buffer contents as a Slice<T>

Clear()

Clears the buffer, keeping the internally allocated array.

Item[int]

Gets a reference to an element in the buffer

Length

Gets or sets the length of the buffer

SubSlice(int, int)

Returns a range within this buffer as a Slice<T>