#pragma once
/***
- This file is part of systemd.
-
Copyright 2010 Lennart Poettering
***/
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 */
+#define CELLESCAPE_DEFAULT_LENGTH 64
+
bool nulstr_contains(const char *nulstr, const char *needle);
char* strshorten(char *s, size_t l);