hyphenation

Types

pub opaque type Hyphenator

Functions

pub fn hyphenate(s: String, h: Hyphenator) -> List(String)

Break a string into hyphenated parts, using a hyphenator.

Example

hyphenate("hyphenation", hyphenator(language.EnglishUS))
// -> ["hy", "phen", "ation"]
pub fn hyphenate_delim(
  s: String,
  h: Hyphenator,
  delim: String,
) -> String

Hyphenate a string using a hyphenator, delim is hyphen character.

Example

hyphenate_delim("hyphenation", hyphenator(language.EnglishUS), "-")
// -> "hy-phen-ation"
pub fn hyphenator(l: Language) -> Hyphenator

Construct Hyphenator from desired language.

Search Document