summaryrefslogtreecommitdiff
path: root/src/basic/string-util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/string-util.h')
-rw-r--r--src/basic/string-util.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/basic/string-util.h b/src/basic/string-util.h
index 7276cfd6f..5ee7442d9 100644
--- a/src/basic/string-util.h
+++ b/src/basic/string-util.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
#pragma once
/***
@@ -139,9 +140,21 @@ char *strstrip(char *s);
#if 0 /// UNNEEDED by elogind
char *delete_chars(char *s, const char *bad);
#endif // 0
+char *delete_trailing_chars(char *s, const char *bad);
char *truncate_nl(char *s);
#if 0 /// UNNEEDED by elogind
+static inline char *skip_leading_chars(const char *s, const char *bad) {
+
+ if (!s)
+ return NULL;
+
+ if (!bad)
+ bad = WHITESPACE;
+
+ return (char*) s + strspn(s, bad);
+}
+
char ascii_tolower(char x);
char *ascii_strlower(char *s);
char *ascii_strlower_n(char *s, size_t n);