format

package
v0.0.0-...-e21bd8d Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatTextBreak

func FormatTextBreak(text string, width int, tabSize int) []string

FormatTextBreak preserves tabs and newlines. Lines longer than width are broken at the last space before width, if possible, otherwise at width. All lines space padded to width. Each single visble rune counts toward width.

func FormatTextClipCol

func FormatTextClipCol(text string, width int, tabSize int, col int) []string

FormatTextClipCol preserves tabs and newlines. Lines longer than width are clipped at width. All lines space padded to width. Each single visible rune counts toward width, beginning at column col.

Types

This section is empty.

Jump to

Keyboard shortcuts

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