diff options
author | John Wiegley <johnw@newartisans.com> | 2006-03-28 18:27:12 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 02:41:32 -0400 |
commit | f9b874e1cbbbf8f64699379009e70d849da1fcf1 (patch) | |
tree | ca4c874a1b67051cc84efa3a035e311377d46257 /format.h | |
parent | 5a93d4819e5fc753352618b729e0fe45532166b9 (diff) | |
download | ledger-f9b874e1cbbbf8f64699379009e70d849da1fcf1.tar.gz ledger-f9b874e1cbbbf8f64699379009e70d849da1fcf1.tar.bz2 ledger-f9b874e1cbbbf8f64699379009e70d849da1fcf1.zip |
Added elision styles.
Diffstat (limited to 'format.h')
-rw-r--r-- | format.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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; }; |