summaryrefslogtreecommitdiff
path: root/src/basic/string-util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-11-03 12:25:29 +0100
committerLennart Poettering <lennart@poettering.net>2015-11-03 17:45:11 +0100
commitb11d6a7bed4d867fb9f6ff4e7eb4ab20fcdc9301 (patch)
treed724afc2b5b4c81a87d68f4f5a8f46ea11789d61 /src/basic/string-util.h
parent5703176d6e9680c32caac1de2d6bdb84cdc72c96 (diff)
util-lib: move character class definitions to string-util.h
Diffstat (limited to 'src/basic/string-util.h')
-rw-r--r--src/basic/string-util.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/basic/string-util.h b/src/basic/string-util.h
index 15244b8184..54f9d3058c 100644
--- a/src/basic/string-util.h
+++ b/src/basic/string-util.h
@@ -26,6 +26,18 @@
#include "macro.h"
+/* What is interpreted as whitespace? */
+#define WHITESPACE " \t\n\r"
+#define NEWLINE "\n\r"
+#define QUOTES "\"\'"
+#define COMMENTS "#;"
+#define GLOB_CHARS "*?["
+#define DIGITS "0123456789"
+#define LOWERCASE_LETTERS "abcdefghijklmnopqrstuvwxyz"
+#define UPPERCASE_LETTERS "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+#define LETTERS LOWERCASE_LETTERS UPPERCASE_LETTERS
+#define ALPHANUMERICAL LETTERS DIGITS
+
#define streq(a,b) (strcmp((a),(b)) == 0)
#define strneq(a, b, n) (strncmp((a), (b), (n)) == 0)
#define strcaseeq(a,b) (strcasecmp((a),(b)) == 0)