aboutsummaryrefslogtreecommitdiff
path: root/libcpp/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'libcpp/internal.h')
-rw-r--r--libcpp/internal.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libcpp/internal.h b/libcpp/internal.h
index 9f39b21..74ae6c6 100644
--- a/libcpp/internal.h
+++ b/libcpp/internal.h
@@ -585,6 +585,9 @@ static inline unsigned char *uxstrdup (const unsigned char *);
static inline unsigned char *ustrchr (const unsigned char *, int);
static inline int ufputs (const unsigned char *, FILE *);
+/* Use a const char for the second parameter since it is usually a literal. */
+static inline int ustrcspn (const unsigned char *, const char *);
+
static inline int
ustrcmp (const unsigned char *s1, const unsigned char *s2)
{
@@ -597,6 +600,12 @@ ustrncmp (const unsigned char *s1, const unsigned char *s2, size_t n)
return strncmp ((const char *)s1, (const char *)s2, n);
}
+static inline int
+ustrcspn (const unsigned char *s1, const char *s2)
+{
+ return strcspn ((const char *)s1, s2);
+}
+
static inline size_t
ustrlen (const unsigned char *s1)
{