mirror of
https://github.com/chatmail/core.git
synced 2026-04-28 02:46:29 +03:00
Update dc_truncate() comment
This commit is contained in:
@@ -19,8 +19,8 @@ pub(crate) fn dc_exactly_one_bit_set(v: i32) -> bool {
|
|||||||
0 != v && 0 == v & (v - 1)
|
0 != v && 0 == v & (v - 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Shortens a string to a specified length and adds "..." or "[...]" to the end of
|
/// Shortens a string to a specified length and adds "[...]" to the
|
||||||
/// the shortened string.
|
/// end of the shortened string.
|
||||||
pub(crate) fn dc_truncate(buf: &str, approx_chars: usize) -> Cow<str> {
|
pub(crate) fn dc_truncate(buf: &str, approx_chars: usize) -> Cow<str> {
|
||||||
let ellipse = "[...]";
|
let ellipse = "[...]";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user