summaryrefslogtreecommitdiffstats
path: root/src/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index 9267091..fc701cd 100644
--- a/src/util.h
+++ b/src/util.h
@@ -70,6 +70,10 @@ int GetProcessorCount();
/// on error.
double GetLoadAverage();
+/// Elide the given string @a str with '...' in the middle if the length
+/// exceeds @a width.
+string ElideMiddle(const string& str, size_t width);
+
#ifdef _MSC_VER
#define snprintf _snprintf
#define fileno _fileno