func (w Wrapper) Wrap(s string, limit int) string {
	if w.LimitIncludesPrefixSuffix {
		limit -= utf8.RuneCountInString(w.OutputLinePrefix) + utf8.RuneCountInString(w.OutputLineSuffix)
	}
	var ret string
	for _, str := range strings.Split(s, w.Newline) {
		str = strings.TrimPrefix(str, w.TrimInputPrefix)
		str = strings.TrimSuffix(str, w.TrimInputSuffix)
		ret += w.line(str, limit) + w.Newline
	}
	if w.StripTrailingNewline {
		return strings.TrimSuffix(ret, w.Newline)
	}
	return ret
}
Wrap will wrap one or more lines of text at the given length.
If limit is less than 1, the string remains unwrapped.
package wrap
import (
	"strings"
	"unicode/utf8"
)
const (
	defaultBreakpoints = " -"
	defaultNewline     = "\n"
)
type Wrapper struct {
	Breakpoints string
	Newline string
	OutputLinePrefix string
	OutputLineSuffix string
	LimitIncludesPrefixSuffix bool
	TrimInputPrefix string
	TrimInputSuffix string
	StripTrailingNewline bool
	CutLongWords bool
}
func NewWrapper() Wrapper {
	return Wrapper{
		Breakpoints:               defaultBreakpoints,
		Newline:                   defaultNewline,
		LimitIncludesPrefixSuffix: true,
	}
}
func Wrap(s string, limit int) string {
	return NewWrapper().Wrap(s, limit)
}