pub trait StrMutExt {
// Required methods
fn truncate_newline(&mut self) -> bool;
fn truncate_end_whitespaces(&mut self);
fn append_ellipsis(&mut self);
}
Expand description
Common extensions to mutable strings.
Required Methods§
sourcefn truncate_newline(&mut self) -> bool
fn truncate_newline(&mut self) -> bool
Truncate this string at the first newline.
Appends an ellipsis if the string was truncated.
Returns true
if the string was truncated.
sourcefn truncate_end_whitespaces(&mut self)
fn truncate_end_whitespaces(&mut self)
Truncate whitespaces at the end of the string.
sourcefn append_ellipsis(&mut self)
fn append_ellipsis(&mut self)
Append an ellipsis, except if this string already ends with an ellipsis.