diff options
author | John Wiegley <johnw@newartisans.com> | 2007-05-21 20:42:05 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 03:39:06 -0400 |
commit | 7380da43ab403dacb41d2010093d11942bb7cec1 (patch) | |
tree | 1b9db99b018695254584fe9f8b9ca34a4aa073cb /src/traversal/abbrev.h | |
parent | f12d41f233d460bd6d2eb8efb90bf6e36e994a30 (diff) | |
download | fork-ledger-7380da43ab403dacb41d2010093d11942bb7cec1.tar.gz fork-ledger-7380da43ab403dacb41d2010093d11942bb7cec1.tar.bz2 fork-ledger-7380da43ab403dacb41d2010093d11942bb7cec1.zip |
Many changes.
Diffstat (limited to 'src/traversal/abbrev.h')
-rw-r--r-- | src/traversal/abbrev.h | 23 |
1 files changed, 23 insertions, 0 deletions
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 |