blob: eabc47d471dda4e666d6ef6d9fa3068eaaa36ef6 (
plain) (
tree)
|
|
use smartstring::{LazyCompact, SmartString};
/// Given a slice of text, return the text re-wrapped to fit it
/// within the given width.
pub fn reflow_hard_wrap(text: &str, max_line_len: usize) -> SmartString<LazyCompact> {
textwrap::refill(text, max_line_len).into()
}
|