ansi

package
v0.1.1-0...-7170e74 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const Marker = '\x1B'

Variables

This section is empty.

Functions

func IsTerminator

func IsTerminator(c rune) bool

func PrintableRuneWidth

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

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