input

package
v2.0.9 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsANSIEscape added in v2.0.4

func IsANSIEscape(input string, start int) bool

IsANSIEscape checks if the given rune slice contains an ANSI escape sequence on the given index.

func IsANSIReset added in v2.0.4

func IsANSIReset(input string, start int) bool

IsANSIReset checks if the given rune slice contains an ANSI reset sequence on the given index.

func ReadANSISequence added in v2.0.4

func ReadANSISequence(input string, start int) (string, int)

ReadANSISequence reads an ANSI escape sequence from the given rune slice and returns the sequence and the end index.

func Text

func Text(str string) (string, bool, error)

Text opens a full screen text editor in console mode and returns the entered string.

Returns true if saved.

Types

type RGB added in v2.0.4

type RGB struct {
	R uint8
	G uint8
	B uint8
}

RGB is a RGB color representation.

func ExtractRGB added in v2.0.4

func ExtractRGB(input string) RGB

ExtractRGB extracts the RGB values from an ANSI escape sequence.

Jump to

Keyboard shortcuts

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