From 7380da43ab403dacb41d2010093d11942bb7cec1 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 21 May 2007 20:42:05 +0000 Subject: Many changes. --- src/traversal/abbrev.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/traversal/abbrev.h (limited to 'src/traversal/abbrev.h') diff --git a/src/traversal/abbrev.h b/src/traversal/abbrev.h new file mode 100644 index 00000000..ad880e45 --- /dev/null +++ b/src/traversal/abbrev.h @@ -0,0 +1,23 @@ +#ifndef _ABBREV_H +#define _ABBREV_H + +#include "utils.h" + +namespace ledger { + +enum elision_style_t { + TRUNCATE_TRAILING, + TRUNCATE_MIDDLE, + TRUNCATE_LEADING, + ABBREVIATE +}; + +string abbreviate(const string& str, + unsigned int width, + elision_style_t elision_style = TRUNCATE_TRAILING, + const bool is_account = false, + int abbrev_length = 2); + +} // namespace ledger + +#endif // _ABBREV_H -- cgit v1.2.3