diff options
Diffstat (limited to '')
-rw-r--r-- | include/strings.h | 35 |
1 files changed, 33 insertions, 2 deletions
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 <bits/types.h> @@ -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, @@ -96,6 +97,36 @@ int strncasecmp(const char*, const char*, size_t) /** + * 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`. * * This is a deprecated BSD extension. |