parser: Remove the unused attribute alignment from struct declaration_specifiers_t.
[cparser] / adt / strutil.h
1 /*
2  * This file is part of cparser.
3  * Copyright (C) 2012 Christoph Mallon <christoph.mallon@gmx.de>
4  */
5 #ifndef STRUTIL_H
6 #define STRUTIL_H
7
8 #include <stdbool.h>
9 #include <string.h>
10
11 static inline bool streq(char const* a, char const* b)
12 {
13         return strcmp(a, b) == 0;
14 }
15
16 static inline char const* strstart(char const* str, char const* start)
17 {
18         do {
19                 if (*start == '\0')
20                         return str;
21         } while (*str++ == *start++);
22         return NULL;
23 }
24
25 /**
26  * Test two strings for equality, ignoring double underscores on the second.
27  */
28 bool streq_underscore(const char *s1, const char *s2);
29
30 #endif