diff options
author | John Wiegley <johnw@newartisans.com> | 2007-04-27 10:08:42 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 03:38:31 -0400 |
commit | 0eb597a681115d6d5dd2ea4511fa3b8c7b3d9c9f (patch) | |
tree | 750d64f6817282a6f4744058f73164a2996f6b03 /register.h | |
parent | d01629148383261d7944e91fd2ac67b334a6834d (diff) | |
download | fork-ledger-0eb597a681115d6d5dd2ea4511fa3b8c7b3d9c9f.tar.gz fork-ledger-0eb597a681115d6d5dd2ea4511fa3b8c7b3d9c9f.tar.bz2 fork-ledger-0eb597a681115d6d5dd2ea4511fa3b8c7b3d9c9f.zip |
Restructured the code to use the new utility code in utils.h.
Diffstat (limited to 'register.h')
-rw-r--r-- | register.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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 |