wrap

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2022 License: Apache-2.0, MIT, MIT Imports: 1 Imported by: 0

README

wrap

Go library for wrapping long strings.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func At

func At(s string, c byte, n int) string

At wraps the given string at the given byte. If possible, the string will be wrapped at the first appearance of the given byte before the given length. If the given byte only appears after the given length, the string will be wrapped at the first appearance. The string will be unaltered otherwise.

func Force

func Force(s string, n int) string

Force wraps the given string without checking for newline characters.

func Space

func Space(s string, n int) string

Space wraps the given string at a whitespace character.

func Wrap

func Wrap(s string, n int) string

Wrap wraps the given string forcefully with the given length.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL