package
module
Version:
v0.0.0-...-65d8968
Opens a new window with list of versions in this module.
Published: Sep 11, 2020
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 26
Opens a new window with list of known importers.
README
¶
go-textwrapper
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
Documentation
¶
A writer that wraps long text lines to a specified length.
Returns a writer that splits its input into multiple parts that have the same
length and adds a separator between these parts.
Creates a RFC822 text wrapper. It adds a CRLF (ie. \r\n) each 76 characters.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.