aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-09-02 17:21:27 +0200
committerMattias Andrée <maandree@operamail.com>2015-09-02 17:21:27 +0200
commit7ace9cd8af1de301d1e4d8a1de0b6fb94104c9fc (patch)
tree4e286a2c7a05d17a1f281bd3009cac3a6b50f5b7 /include
parenttypo (diff)
downloadslibc-7ace9cd8af1de301d1e4d8a1de0b6fb94104c9fc.tar.gz
slibc-7ace9cd8af1de301d1e4d8a1de0b6fb94104c9fc.tar.bz2
slibc-7ace9cd8af1de301d1e4d8a1de0b6fb94104c9fc.tar.xz
add prototypes for strcasecmp_l and strncasecmp_l
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'include')
-rw-r--r--include/strings.h35
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.