english

package
v1.8.9 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package english contains minor utilities for generating English-language text.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Conjoin

func Conjoin(ss []string, conj string) string

Conjoin returns a set of strings joined together with the specified conjunction and (of course) the Oxford comma.

Types

type Wrapper

type Wrapper struct {
	// contains filtered or unexported fields
}

Wrapper is a rudimentary word-wrapper. Text written to it is word-wrapped at 78 columns. Lines starting with space characters are left untouched.

func NewWrapper

func NewWrapper(w io.Writer) *Wrapper

NewWrapper creates a new Wrapper, writing to the provided writer. The Wrapper must be closed to flush the last line of output.

func (*Wrapper) Close

func (ww *Wrapper) Close() (err error)

Close flushes the Wrapper output and closes it.

func (*Wrapper) Write

func (ww *Wrapper) Write(b []byte) (n int, err error)

func (*Wrapper) WriteString

func (ww *Wrapper) WriteString(s string) (int, error)

WriteString writes a string to the Wrapper.

Jump to

Keyboard shortcuts

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