summaryrefslogtreecommitdiff
path: root/src/basic/string-util.h
diff options
context:
space:
mode:
authorSven Eden <yamakuzure@gmx.net>2018-03-13 19:11:43 +0100
committerSven Eden <yamakuzure@gmx.net>2018-03-26 18:25:45 +0200
commit5a1765290e87f45b970657cfc8ac1e7ca5c50d6a (patch)
tree316b8b753c02e894a621976a888d8741e3cf9156 /src/basic/string-util.h
parent869eeae5727fa42bbb442ef10c0dde985fcdce4d (diff)
Prep v236 : Add missing SPDX-License-Identifier (2/9) src/basic
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);