summaryrefslogtreecommitdiff
path: root/src/abbrev.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/abbrev.h')
-rw-r--r--src/abbrev.h23
1 files changed, 23 insertions, 0 deletions
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