From 8cef2ca2598cfd0587faf29d0025d68c7dc598ea Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 12 Nov 2017 16:16:33 +0100 Subject: m + add readme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libsimple.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libsimple.h') diff --git a/libsimple.h b/libsimple.h index 019d261..575d36d 100644 --- a/libsimple.h +++ b/libsimple.h @@ -716,6 +716,13 @@ int libsimple_strstarts(const char *, const char *); #endif +_LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __nonnull__, __warn_unused_result__))) +int libsimple_strcasestarts(const char *__s, const char *__t) { return !strncasecmp(__s, __t, strlen(__t)); } +#ifndef strcasestarts +# define strcasestarts libsimple_strcasestarts +#endif + + _LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __nonnull__, __warn_unused_result__))) int libsimple_strends(const char *, const char *); #ifndef strends @@ -723,6 +730,13 @@ int libsimple_strends(const char *, const char *); #endif +_LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __nonnull__, __warn_unused_result__))) +int libsimple_strcaseends(const char *, const char *); +#ifndef strcaseends +# define strcaseends libsimple_strcaseends +#endif + + _LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __nonnull__, __warn_unused_result__))) char *libsimple_strcasestr(const char *, const char *); #ifndef strcasestr -- cgit v1.2.3-70-g09d2