ansi

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2021 License: MIT Imports: 4 Imported by: 116

Documentation

Index

Constants

View Source
const Marker = '\x1B'

Variables

This section is empty.

Functions

func IsTerminator added in v0.3.0

func IsTerminator(c rune) bool

func PrintableRuneWidth added in v0.2.0

func PrintableRuneWidth(s string) int

PrintableRuneWidth returns the cell width of the given string.

Types

type Buffer

type Buffer struct {
	bytes.Buffer
}

Buffer is a buffer aware of ANSI escape sequences.

func (Buffer) PrintableRuneWidth added in v0.2.0

func (w Buffer) PrintableRuneWidth() int

PrintableRuneWidth returns the cell width of all printable runes in the buffer.

type Writer

type Writer struct {
	Forward io.Writer
	// contains filtered or unexported fields
}

func (*Writer) LastSequence

func (w *Writer) LastSequence() string

func (*Writer) ResetAnsi

func (w *Writer) ResetAnsi()

func (*Writer) RestoreAnsi

func (w *Writer) RestoreAnsi()

func (*Writer) Write

func (w *Writer) Write(b []byte) (int, error)

Write is used to write content to the ANSI buffer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL