MCPcopy
hub / github.com/pterm/pterm / ParagraphPrinter

Struct ParagraphPrinter

paragraph_printer.go:17–20  ·  view source on GitHub ↗

ParagraphPrinter can print paragraphs to a fixed line width. The text will split between words, so that words will stick together. It's like in a book.

Source from the content-addressed store, hash-verified

15// The text will split between words, so that words will stick together.
16// It's like in a book.
17type ParagraphPrinter struct {
18 MaxWidth int
19 Writer io.Writer
20}
21
22// WithMaxWidth returns a new ParagraphPrinter with a specific MaxWidth
23func (p ParagraphPrinter) WithMaxWidth(width int) *ParagraphPrinter {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected