summaryrefslogtreecommitdiffstats
path: root/src/util/format.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/format.rs')
-rw-r--r--src/util/format.rs24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/util/format.rs b/src/util/format.rs
index 3a9bc54..3079840 100644
--- a/src/util/format.rs
+++ b/src/util/format.rs
@@ -26,27 +26,3 @@ pub fn mtime_to_string(mtime: time::SystemTime) -> String {
let datetime: chrono::DateTime<chrono::offset::Local> = mtime.into();
datetime.format(MTIME_FORMATTING).to_string()
}
-
-pub fn format_tab_bar_title_string(
- max_len: usize,
- number: Option<usize>,
- title: impl Into<String>,
-) -> String {
- let title: String = title.into();
-
- if let Some(number) = number {
- if title.len() > max_len {
- format!(
- "{}: {}…",
- number + 1,
- title.chars().take(max_len - 1).collect::<String>()
- )
- } else {
- format!("{}: {}", number + 1, title)
- }
- } else if title.len() > max_len {
- format!("{}…", title.chars().take(max_len - 1).collect::<String>())
- } else {
- title.to_string()
- }
-}