From 7ace9cd8af1de301d1e4d8a1de0b6fb94104c9fc Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 2 Sep 2015 17:21:27 +0200 Subject: add prototypes for strcasecmp_l and strncasecmp_l MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- include/strings.h | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/strings.h b/include/strings.h index a06a167..224c9a4 100644 --- a/include/strings.h +++ b/include/strings.h @@ -23,6 +23,7 @@ #define __NEED_size_t +#define __NEED_locale_t #include @@ -72,7 +73,7 @@ int bcmp(const void*, const void*, size_t) * Be aware, only ASCII characters are case insensitive, non-ASCII * characters are case sensitive. * - * @param a A negetive value is returned if this is the lesser. + * @param a A negative value is returned if this is the lesser. * @param b A positive value is returned if this is the lesser. * @return Zero is returned if `a` and `b` are equal, otherwise, * see the specifications for `a` and `b`. @@ -85,7 +86,7 @@ int strcasecmp(const char*, const char*) * Be aware, only ASCII characters are case insensitive, non-ASCII * characters are case sensitive. * - * @param a A negetive value is returned if this is the lesser. + * @param a A negative value is returned if this is the lesser. * @param b A positive value is returned if this is the lesser. * @param length The maximum number of characters to compare. * @return Zero is returned if `a` and `b` are equal, otherwise, @@ -95,6 +96,36 @@ int strncasecmp(const char*, const char*, size_t) __GCC_ONLY(__attribute__((warn_unused_result, nonnull, pure))); +/** + * Compare two strings alphabetically in a case insensitive manner. + * Be aware, only ASCII characters are case insensitive, non-ASCII + * characters are case sensitive. + * + * @param a A negative value is returned if this is the lesser. + * @param b A positive value is returned if this is the lesser. + * @param locale The locale. + * @return Zero is returned if `a` and `b` are equal, otherwise, + * see the specifications for `a` and `b`. + */ +int strcasecmp_l(const char*, const char*, locale_t) /* TODO */ + __GCC_ONLY(__attribute__((warn_unused_result, nonnull, pure))); + +/** + * Compare two strings alphabetically in a case insensitive manner. + * Be aware, only ASCII characters are case insensitive, non-ASCII + * characters are case sensitive. + * + * @param a A negative value is returned if this is the lesser. + * @param b A positive value is returned if this is the lesser. + * @param length The maximum number of characters to compare. + * @param locale The locale. + * @return Zero is returned if `a` and `b` are equal, otherwise, + * see the specifications for `a` and `b`. + */ +int strncasecmp_l(const char*, const char*, size_t, locale_t) /* TODO */ + __GCC_ONLY(__attribute__((warn_unused_result, nonnull, pure))); + + /** * This function is identical to `strchr`. * -- cgit v1.2.3-70-g09d2