Function deltachat::tools::truncate

source ·
pub(crate) fn truncate(buf: &str, approx_chars: usize) -> Cow<'_, str>
Expand description

Shortens a string to a specified length and adds “[…]” to the end of the shortened string.