chiark / gitweb /
tree-wide: remove Lennart's copyright lines
[elogind.git] / src / basic / string-util.h
index 7ee9aef70833a6ffde5038a6c51388e062beab50..2dcf6b93e328f49a70ebc6afb6d0fc2f9c7923c7 100644 (file)
@@ -1,12 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 #pragma once
 
-/***
-  This file is part of systemd.
-
-  Copyright 2010 Lennart Poettering
-***/
-
 #include <alloca.h>
 #include <stdbool.h>
 #include <stddef.h>
@@ -164,7 +158,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 */