Documentation
¶
Overview ¶
The refmt package contains extra string utility functions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Style ¶
type Style struct {
IndentWidth int // Number of indent characters to prepend
IndentChar rune // Character to fill indent space with
MaxWidth int // Maximum width of line (not counting indent)
SplitChar rune // usually a newline
WordSep rune // usually a space
// when a word exceeds maxWidth, do we allow a long line to
// exceed maxwidth or split the word?
BreakLongWords bool
}
The Wrap object may be used to indent and/or wrap/rewrap strings.
func NewStyle ¶
func NewStyle() *Style
NewWrap returns a new Wrap object preconfigured for a 4 space indent and 76 character lines.
Click to show internal directories.
Click to hide internal directories.