getimap/vendor/github.com/emersion/go-textwrapper
2020-03-10 13:57:28 +01:00
..
.gitignore initial commit for getimap 2020-03-10 13:57:28 +01:00
.travis.yml initial commit for getimap 2020-03-10 13:57:28 +01:00
LICENSE initial commit for getimap 2020-03-10 13:57:28 +01:00
README.md initial commit for getimap 2020-03-10 13:57:28 +01:00
wrapper.go initial commit for getimap 2020-03-10 13:57:28 +01:00

go-textwrapper

GoDoc Build Status

A writer that wraps long text lines to a specified length

Usage

import (
	"os"

	"github.com/emersion/go-textwrapper"
)

func main() {
	w := textwrapper.New(os.Stdout, "/", 5)

	w.Write([]byte("helloworldhelloworldhelloworld"))
	// Output: hello/world/hello/world/hello/world
}

License

MIT