Documentation ¶
Overview ¶
Package str has string and stdout functions.
Index ¶
- Constants
- func GetTerminalWidth() (int, error)
- func Month(month string) int
- func PathTitle(name string) string
- func Piped() bool
- func Progress(w io.Writer, name string, count, total int) float64
- func RemoveLine() string
- func TimeTaken(w io.Writer, elapsed float64)
- func Total(w io.Writer, count int, name string)
- func Truncate(text string, length int) string
- func X() string
- func Y() string
- func YearAbbr(s string) int
Constants ¶
View Source
const ( NothingToDo = " OK, nothing to do" // NothingToDo is the message when there is nothing to do. PrePad = "\t " // PrePad is the prefix padding for stdout. )
Variables ¶
This section is empty.
Functions ¶
func GetTerminalWidth ¶ added in v1.11.1
func PathTitle ¶ added in v1.11.1
PathTitle returns the title of the release extracted from the named directory path of the release. This is intended as a fallback when a file_id.diz cannot be parsed.
func Piped ¶
func Piped() bool
Piped detects whether the program text is being piped to another operating system command or sent to stdout.
func RemoveLine ¶ added in v1.11.1
func RemoveLine() string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.