Skip to main content

split_long

Function split_long 

Source
pub fn split_long(sentence: &str, max_chars: usize) -> String
Expand description

Try to split sentence so each piece fits within max_chars.

Returns the input unchanged if it’s already short enough, or if no natural split point exists inside the budget. The returned string joins fragments with " ", so downstream sentence-termination and cleanup still work.