File: README.md

package info (click to toggle)
golang-github-emersion-go-textwrapper 0.0~git20160606.d0e65e5-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 76 kB
  • sloc: makefile: 2
file content (27 lines) | stat: -rw-r--r-- 589 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# go-textwrapper

[![GoDoc](https://godoc.org/github.com/emersion/go-textwrapper?status.svg)](https://godoc.org/github.com/emersion/go-textwrapper)
[![Build Status](https://travis-ci.org/emersion/go-textwrapper.svg?branch=master)](https://travis-ci.org/emersion/go-textwrapper)

A writer that wraps long text lines to a specified length

## Usage

```go
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