From 3fb5a1c320c32f14daa60f6cc4a3d0041663076a Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 14 May 2007 11:09:58 +0000 Subject: Changed xpath to use intrusive_ptr; got the xml command working --- src/abbrev.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/abbrev.h (limited to 'src/abbrev.h') diff --git a/src/abbrev.h b/src/abbrev.h new file mode 100644 index 00000000..ad880e45 --- /dev/null +++ b/src/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