Struct textwrap::NoHyphenation [] [src]

pub struct NoHyphenation;

Use this as a Wrapper.splitter to avoid any kind of hyphenation: ``` use textwrap::{Wrapper, NoHyphenation};

let wrapper = Wrapper::new(8).word_splitter(Box::new(NoHyphenation)); assert_eq!(wrapper.wrap("foo bar-baz"), vec!["foo", "bar-baz"]); ```

Trait Implementations

impl WordSplitter for NoHyphenation
[src]

NoHyphenation implements WordSplitter by not splitting the word at all.

Return all possible splits of word. Each split is a triple with a head, a hyphen, and a tail where head + &hyphen + &tail == word. The hyphen can be empty if there is already a hyphen in the head. Read more