prettywords

package module
v0.0.0-...-9d37a7f Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2015 License: MIT Imports: 1 Imported by: 15

README

pretty-words

Solving the prettify words problem of formatting words according to a width e.g n characters.

I was inspired to solve this after an algorithms class over complicated the problem solution

and they couldn't explain it to the class. I thought the implementation should be straightforward.

Installing and using

$ go get github.com/odeke-em/pretty-words/cmd/pretty-words
$ pretty-words <content>

Documentation

Index

Constants

View Source
const Space = " "

Variables

This section is empty.

Functions

This section is empty.

Types

type PrettyRubric

type PrettyRubric struct {
	Limit            int
	Body             []string
	PadTrailingSpace bool
}

func (*PrettyRubric) Format

func (pr *PrettyRubric) Format() (formatted []string)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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