path: root/src/basic/string-util.h
diff options
Diffstat (limited to 'src/basic/string-util.h')
1 files changed, 4 insertions, 1 deletions
diff --git a/src/basic/string-util.h b/src/basic/string-util.h
index 7ee9aef70..1671697a0 100644
--- a/src/basic/string-util.h
+++ b/src/basic/string-util.h
@@ -164,7 +164,10 @@ static inline bool _pure_ in_charset(const char *s, const char* charset) {
bool string_has_cc(const char *p, const char *ok) _pure_;
char *ellipsize_mem(const char *s, size_t old_length_bytes, size_t new_length_columns, unsigned percent);
-char *ellipsize(const char *s, size_t length, unsigned percent);
+static inline char *ellipsize(const char *s, size_t length, unsigned percent) {
+ return ellipsize_mem(s, strlen(s), length, percent);
char *cellescape(char *buf, size_t len, const char *s);
/* This limit is arbitrary, enough to give some idea what the string contains */