aboutsummaryrefslogtreecommitdiff
path: root/gcc/system.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/system.h')
-rw-r--r--gcc/system.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/system.h b/gcc/system.h
index 95e5430..3c85626 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -1296,4 +1296,12 @@ void gcc_stablesort (void *, size_t, size_t,
#define NULL nullptr
#endif
+/* Return true if STR string starts with PREFIX. */
+
+static inline bool
+startswith (const char *str, const char *prefix)
+{
+ return strncmp (str, prefix, strlen (prefix)) == 0;
+}
+
#endif /* ! GCC_SYSTEM_H */