Table of Contents

Method DecodeRune

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

DecodeRune(string, int, int)

Unpacks the first UTF-8 encoding in the string and returns the rune and its width in bytes.

public static (Rune Rune, int Size) DecodeRune(this string str, int start = 0, int count = -1)

Parameters

str string

The string to decode.

start int

Starting offset.

count int

Number of bytes in the buffer, or -1 to make it the length of the buffer.

Returns

(Rune rune, int size)

Remarks

This is a Terminal.Gui extension method to string to support TUI text manipulation.