hyphenations

package module
v0.0.0-...-d327b8e Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	*core.Builder
	// contains filtered or unexported fields
}

func NewBuilder

func NewBuilder() *Builder

func (*Builder) Build

func (that *Builder) Build() (*Engine, error)

func (*Builder) CharA

func (that *Builder) CharA(charA string) *Builder

func (*Builder) CharAen

func (that *Builder) CharAen(charAen string) *Builder

func (*Builder) CharN

func (that *Builder) CharN(charN string) *Builder

func (*Builder) CharNen

func (that *Builder) CharNen(charNen string) *Builder

func (*Builder) CharV

func (that *Builder) CharV(charV string) *Builder

func (*Builder) CharVen

func (that *Builder) CharVen(charVen string) *Builder

func (*Builder) CharX

func (that *Builder) CharX(charX string) *Builder

func (*Builder) CharXen

func (that *Builder) CharXen(charXen string) *Builder

func (*Builder) Hyphen

func (that *Builder) Hyphen(hyphen rune) *Builder

type Engine

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

func (*Engine) Hyphenate

func (that *Engine) Hyphenate(text string, hyph string) string

Hyphenate returns text with all available hyphens. Hyph is a string that will be inserted between parts of the word.

func (*Engine) Split

func (that *Engine) Split(
	text string,
	width int,
) (lines []string)

Split returns slice of lines, where length of each of them is less or equal param width.

Jump to

Keyboard shortcuts

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