Function truncate

Source
pub fn truncate(value: &str, max_len: usize) -> String
Expand description

Truncates a string to a maximum length with ellipsis

§Arguments

  • value - The string to truncate
  • max_len - Maximum length

§Returns

A truncated string