Skip to main content

derive_title

Function derive_title 

Source
pub fn derive_title(rope: &Rope, max_chars: usize) -> Option<String>
Expand description

First non-empty trimmed line of rope, clipped to max_chars.

Returns None when the rope is empty or only whitespace. The result is trimmed of leading + trailing whitespace; trailing ellipsis (“…”) is appended only when truncation actually drops characters.