text

package
v0.0.0-...-a45e4f9 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RESET     = "\033[0m"
	UNDERLINE = "\033[3m"
	RED       = "\033[31m"
	GREEN     = "\033[32m"
	YELLOW    = "\033[33m"
	BLUE      = "\033[34m"
	PURPLE    = "\033[35m"
	CYAN      = "\033[36m"
	GRAY      = "\033[37m"
	WHITE     = "\033[97m"
	BULLET    = "  ▪ "
	RT_ERROR  = "$Error$"
	ERROR     = "$Error$"
)

Variables

This section is empty.

Functions

func Capitalize

func Capitalize(s string) string

What it says.

func Cyan

func Cyan(s string) string

func DescribeOpposite

func DescribeOpposite(tok *token.Token) string

func DescribePos

func DescribePos(token *token.Token) string

func DescribeTok

func DescribeTok(tok *token.Token) string

Describes a token for the purposes of error messages etc.

func Emph

func Emph(s string) string

func EmphType

func EmphType(s string) string

func ExtractFileName

func ExtractFileName(s string) string

func Flatten

func Flatten(s string) string

func FlattenedFilename

func FlattenedFilename(s string) string

func GetTextWithBarsAsList

func GetTextWithBarsAsList(text string) ([]string, bool)

func Green

func Green(s string) string
func Head(s, substr string) bool

func HighlightLine

func HighlightLine(plainLine string, highlighter rune) (string, rune)

func MakeFilepath

func MakeFilepath(scriptFilepath string) string

func Pretty

func Pretty(s string, lMargin, rMargin int) string

func Red

func Red(s string) string

func Tail

func Tail(s, substr string) bool

func ToEscapedText

func ToEscapedText(s string) string

func Trim

func Trim(path string) string

Removes the last two folders in a filepath. TODO --- is there a more principled way of doing this?

func TweakNameAndPath

func TweakNameAndPath(name, path, source string) (string, string)

func WithoutDots

func WithoutDots(s string) string

func Yellow

func Yellow(s string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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