From 0eb597a681115d6d5dd2ea4511fa3b8c7b3d9c9f Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 27 Apr 2007 10:08:42 +0000 Subject: Restructured the code to use the new utility code in utils.h. --- register.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'register.h') diff --git a/register.h b/register.h index 73078892..ba2020ec 100644 --- a/register.h +++ b/register.h @@ -20,6 +20,19 @@ class register_command : public xml::xpath_t::functor_t virtual void print_document(std::ostream& out, xml::document_t * doc); }; +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 // _REGISTER_H -- cgit v1.2.3