diff options
author | Nicolas Despres <nicolas.despres@gmail.com> | 2012-07-28 12:41:20 (GMT) |
---|---|---|
committer | Nicolas Despres <nicolas.despres@gmail.com> | 2012-07-31 07:24:52 (GMT) |
commit | 8b590881013a05fd5017aa94185a02f6b7d09758 (patch) | |
tree | e83647d4ae44cbaa6f7401b350980f74adb06034 /src/util.h | |
parent | b26f978ac3d7c5fd91de675bba62f31f704e0e04 (diff) | |
download | Ninja-8b590881013a05fd5017aa94185a02f6b7d09758.zip Ninja-8b590881013a05fd5017aa94185a02f6b7d09758.tar.gz Ninja-8b590881013a05fd5017aa94185a02f6b7d09758.tar.bz2 |
Re-factor elide code and test it.
Diffstat (limited to 'src/util.h')
-rw-r--r-- | src/util.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -66,6 +66,10 @@ string StripAnsiEscapeCodes(const string& in); /// 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 |