An efficient and powerful Rust library for word wrapping text.
MIT License
Bot releases are visible (Hide)
Published by mgeisler almost 4 years ago
Version 0.6.0 adds builder methods to Wrapper
for easy one-line initialization and configuration:
let wrapper = Wrapper::new(60).break_words(false);
It also add a new NoHyphenation
word splitter that will never split words, not even at existing hyphens.
Published by mgeisler almost 4 years ago
Version 0.5.0 has breaking API changes. However, this only affects code using the hyphenation feature. The feature is now optional, so
you will first need to enable the hyphenation
feature as described above. Afterwards, please change your code from
wrapper.corpus = Some(&corpus);
to
wrapper.splitter = Box::new(corpus);
Other changes include optimizations, so version 0.5.0 is roughly 10-15% faster than version 0.4.0.
Published by mgeisler almost 4 years ago
Published by mgeisler almost 4 years ago
Added support for automatic hyphenation.
Published by mgeisler almost 4 years ago
Introduced Wrapper
struct. Added support for wrapping on hyphens.
Published by mgeisler almost 4 years ago
First public release with support for wrapping strings on whitespace.