Module textwrap::word_splitters[][src]

Expand description

Word splitting functionality.

To wrap text into lines, long words sometimes need to be split across lines. The WordSplitter trait defines this functionality. HyphenSplitter is the default implementation of this treat: it will simply split words on existing hyphens.

Structs

HyphenSplitter

Simple and default way to split words: splitting on existing hyphens only.

NoHyphenation

Use this as a Options.word_splitter to avoid any kind of hyphenation:

Traits

WordSplitter

The WordSplitter trait describes where words can be split.

Functions

split_words

Split words into smaller words according to the split points given by word_splitter.