summaryrefslogtreecommitdiff
path: root/format.h
diff options
context:
space:
mode:
Diffstat (limited to 'format.h')
-rw-r--r--format.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/format.h b/format.h
index ccbb0f42..778ec53f 100644
--- a/format.h
+++ b/format.h
@@ -73,6 +73,16 @@ struct format_t
std::string format_string;
element_t * elements;
+ enum elision_style_t {
+ TRUNCATE_TRAILING,
+ TRUNCATE_MIDDLE,
+ TRUNCATE_LEADING,
+ ABBREVIATE
+ };
+
+ static elision_style_t elision_style;
+ static int abbrev_length;
+
static bool ansi_codes;
static bool ansi_invert;
@@ -97,6 +107,9 @@ struct format_t
static element_t * parse_elements(const std::string& fmt);
+ static std::string truncate(const std::string& str, unsigned int width,
+ const bool is_account = false);
+
void format(std::ostream& out, const details_t& details) const;
};