blob: 2ba8d173ee1de4ea822771ba6f4d357624c87f32 (
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, text_width: usize) -> SmartString<LazyCompact> {
textwrap::refill(text, text_width).into()
}
|