linewrap

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2023 License: Apache-2.0 Imports: 4 Imported by: 6

README

Package cloudeng.io/text/linewrap

CircleCI Go Report Card

import cloudeng.io/text/linewrap

Package linewrap provides basic support for wrapping text to a given width.

Functions

Func Block
func Block(indent, width int, text string) string

Block wraps the supplied text to width indented by indent spaces.

Func Comment
func Comment(indent, width int, comment, text string) string

Comment wraps the supplied text to width indented by indent spaces with each line starting with the supplied comment string. It is intended for formatting source code comments.

Func Paragraph
func Paragraph(initial, indent, width int, text string) string

Paragraph wraps the supplied text as a 'paragraph' with separate indentation for the initial and subsequent lines to the specified width.

Documentation

Overview

Package linewrap provides basic support for wrapping text to a given width.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Block added in v0.0.7

func Block(indent, width int, text string) string

Block wraps the supplied text to width indented by indent spaces.

func Comment added in v0.0.7

func Comment(indent, width int, comment, text string) string

Comment wraps the supplied text to width indented by indent spaces with each line starting with the supplied comment string. It is intended for formatting source code comments.

func Paragraph added in v0.0.7

func Paragraph(initial, indent, width int, text string) string

Paragraph wraps the supplied text as a 'paragraph' with separate indentation for the initial and subsequent lines to the specified width.

Types

This section is empty.

Jump to

Keyboard shortcuts

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