chiark / gitweb /
basic: remove rm_rf_and_free, add rm_rf_physical_and_free, use rm_rf_physical_and_fre...
[elogind.git] / src / basic / string-util.h
index 48cdc736fd9c25de56296a3be56f822ec0dbc14a..139cc8c91b42bb551fed22c2215fd4922b272e49 100644 (file)
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
 #pragma once
 
 /***
@@ -21,7 +19,9 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <alloca.h>
 #include <stdbool.h>
+#include <stddef.h>
 #include <string.h>
 
 #include "macro.h"
@@ -37,6 +37,7 @@
 #define UPPERCASE_LETTERS "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
 #define LETTERS           LOWERCASE_LETTERS UPPERCASE_LETTERS
 #define ALPHANUMERICAL    LETTERS DIGITS
+#define HEXDIGITS         DIGITS "abcdefABCDEF"
 
 #define streq(a,b) (strcmp((a),(b)) == 0)
 #define strneq(a, b, n) (strncmp((a), (b), (n)) == 0)
@@ -133,6 +134,7 @@ char *ascii_strlower(char *s);
 char *ascii_strlower_n(char *s, size_t n);
 
 int ascii_strcasecmp_n(const char *a, const char *b, size_t n);
+int ascii_strcasecmp_nn(const char *a, size_t n, const char *b, size_t m);
 
 bool chars_intersect(const char *a, const char *b) _pure_;