# Functions
DisableColors (forcefully) disables color coding globally.
EnableColors (forcefully) enables color coding globally.
Escape encodes the string with the ANSI Escape Sequence.
Filter filters the slice 's' to items which return truth when passed to 'f'.
No description provided by the author
InsertEveryN inserts the rune every N characters in the string.
LongestLineLen returns the length of the longest "line" within the argument string.
NewJSONTransformer returns a Transformer that can format a JSON string or an object into pretty-indented JSON-strings.
NewNumberTransformer returns a number Transformer that: - transforms the number as directed by 'format' (ex.: %.2f) - colors negative values Red - colors positive values Green.
NewTimeTransformer returns a Transformer that can format a timestamp (a time.Time) into a well-defined time format defined using the provided layout (ex.: time.RFC3339).
NewUnixTimeTransformer returns a Transformer that can format a unix-timestamp into a well-defined time format as defined by 'layout'.
NewURLTransformer returns a Transformer that can format and pretty print a string that contains a URL (the text is underlined and colored Blue).
OverrideRuneWidthEastAsianWidth can *probably* help with alignment, and length calculation issues when dealing with Unicode character-set and a non-English language set in the LANG variable.
Pad pads the given string with as many characters as needed to make it as long as specified (maxLen).
ProcessCRLF converts "\r\n" to "\n", and processes lone "\r" by moving the cursor/carriage to the start of the line and overwrites the contents accordingly.
RepeatAndTrim repeats the given string until it is as long as maxRunes.
RuneCount is similar to utf8.RuneCountInString, except for the fact that it ignores escape sequences while counting.
RuneWidth returns the mostly accurate character-width of the rune.
RuneWidthWithoutEscSequences is similar to RuneWidth, except for the fact that it ignores escape sequences while counting.
Snip returns the given string with a fixed length.
StringWidth is similar to RuneWidth, except it works on a string.
StringWidthWithoutEscSequences is similar to RuneWidth, except for the fact that it ignores escape sequences while counting.
StripEscape strips all ANSI Escape Sequence from the string.
Trim trims a string to the given length while ignoring escape sequences.
Widen is like width.Widen.String() but ignores escape sequences.
WrapHard wraps a string to the given length using a newline.
WrapSoft wraps a string to the given length using a newline.
WrapText is very similar to WrapHard except for one minor difference.
# Constants
AlignRight for numbers, AlignLeft for the rest.
" center ".
same as AlignLeft.
"justify it".
"left ".
" right".
Background colors.
Background colors.
Background colors.
Background colors.
Background Hi-Intensity colors.
Background Hi-Intensity colors.
Background Hi-Intensity colors.
Background Hi-Intensity colors.
Background Hi-Intensity colors.
Background Hi-Intensity colors.
Background Hi-Intensity colors.
Background Hi-Intensity colors.
Background colors.
Background colors.
Background colors.
Background colors.
Base colors -- attributes in reality.
Base colors -- attributes in reality.
Base colors -- attributes in reality.
Base colors -- attributes in reality.
Base colors -- attributes in reality.
Deprecated Constants.
Deprecated Constants.
CursorDown helps move the Cursor Down X lines.
CursorLeft helps move the Cursor Left X characters.
CursorRight helps move the Cursor Right X characters.
CursorUp helps move the Cursor Up X lines.
Available Directions.
EraseLine helps erase all characters to the Right of the Cursor in the current line.
Constants.
Constants.
Constants.
Constants.
Constants.
Constants.
\x1b.
[.
].
Constants.
Constants.
Constants.
Constants.
Constants.
Constants.
Base colors -- attributes in reality.
Foreground colors.
Foreground colors.
Foreground colors.
Foreground colors.
Foreground Hi-Intensity colors.
Foreground Hi-Intensity colors.
Foreground Hi-Intensity colors.
Foreground Hi-Intensity colors.
Foreground Hi-Intensity colors.
Foreground Hi-Intensity colors.
Foreground Hi-Intensity colors.
Foreground Hi-Intensity colors.
Foreground colors.
Foreground colors.
Foreground colors.
Foreground colors.
default_Case.
lower.
Title.
UPPER.
Base colors -- attributes in reality.
Available Directions.
Deprecated Constants.
Deprecated Constants.
Base colors -- attributes in reality.
Base colors -- attributes in reality.
Available Directions.
No description provided by the author
No description provided by the author
Base colors -- attributes in reality.
"\n\nbottom".
same as VAlignTop.
"\nmiddle\n".
"top\n\n".
# Variables
ANSICodesSupported will be true on consoles where ANSI Escape Codes/Sequences are supported.
# Type aliases
Align denotes how text is to be aligned horizontally.
Color represents a single color to render with.
Colors represents an array of Color objects to render with.
Cursor helps move the cursor on the console in multiple directions.
Direction defines the overall flow of text.
Format lets you transform the text in supported methods while keeping escape sequences in the string intact and untouched.
Transformer helps format the contents of an object to the user's liking.
VAlign denotes how text is to be aligned vertically.