aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libsimple/strn.h310
-rw-r--r--man/libsimple_memcaseeq.36
-rw-r--r--man/libsimple_memcaseeqlen.36
-rw-r--r--man/libsimple_memeq.34
-rw-r--r--man/libsimple_memeqlen.36
-rw-r--r--man/libsimple_memrcaseeqlen.36
-rw-r--r--man/libsimple_memreqlen.36
-rw-r--r--man/libsimple_strcaseeq.34
-rw-r--r--man/libsimple_strcaseeqlen.311
-rw-r--r--man/libsimple_strcaseeqnul.34
-rw-r--r--man/libsimple_streq.35
-rw-r--r--man/libsimple_streqlen.311
-rw-r--r--man/libsimple_streqnul.34
-rw-r--r--man/libsimple_strncaseeq.381
-rw-r--r--man/libsimple_strncaseeqlen.382
-rw-r--r--man/libsimple_strncaseeqnul.381
-rw-r--r--man/libsimple_strneq.380
-rw-r--r--man/libsimple_strneqlen.382
-rw-r--r--man/libsimple_strneqnul.380
-rw-r--r--man/libsimple_strrcaseeqlen.36
-rw-r--r--man/libsimple_strreqlen.36
-rw-r--r--man/libsimple_strrncaseeqlen.381
-rw-r--r--man/libsimple_strrneqlen.381
23 files changed, 982 insertions, 61 deletions
diff --git a/libsimple/strn.h b/libsimple/strn.h
index a69e1ba..0959100 100644
--- a/libsimple/strn.h
+++ b/libsimple/strn.h
@@ -1,127 +1,301 @@
/* See LICENSE file for copyright and license details. */
+/**
+ * Scans for a character in a string, the scan is case-insensitive
+ *
+ * @param s The string to scan
+ * @param c The character for scan for
+ * @param n Truncate `s` to this length if it is longer
+ * @return `s` with a minimal offset such that `*r == c`,
+ * where `r` is the returned pointer, `NULL` if no such offset exists
+ * within the first `n` bytes
+ */
_LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __nonnull__, __warn_unused_result__)))
-char *libsimple_strnchr(const char *, int, size_t);
+char *libsimple_strnchr(const char *, int, size_t); /* TODO doc */
#ifndef strnchr
# define strnchr libsimple_strnchr
#endif
+/**
+ * Scans for a character in a string, the scan is case-insensitive
+ *
+ * @param s The string to scan
+ * @param c The character for scan for
+ * @param n Truncate `s` to this length if it is longer
+ * @return `s` with a minimal offset such that `tolower(*r) == tolower(c)`,
+ * where `r` is the returned pointer, `NULL` if no such offset exists
+ * within the first `n` bytes
+ */
_LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __nonnull__, __warn_unused_result__)))
-char *libsimple_strncasechr(const char *, int, size_t);
+char *libsimple_strncasechr(const char *, int, size_t); /* TODO doc */
#ifndef strncasechr
# define strncasechr libsimple_strncasechr
#endif
+/**
+ * Scans for a character in a string, the scan is case-sensitive
+ *
+ * @param s The string to scan
+ * @param c The character for scan for
+ * @param n Truncate `s` to this length if it is longer
+ * @return `s` with a minimal offset such that `*r == c || !*r`,
+ * where `r` is the returned pointer, however if no such
+ * offset exists within the first `n` bytes, `&s[n]` is returned
+ */
_LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __nonnull__, __returns_nonnull__, __warn_unused_result__)))
-char *libsimple_strnchrnul(const char *, int, size_t);
+char *libsimple_strnchrnul(const char *, int, size_t); /* TODO doc */
#ifndef strnchrnul
# define strnchrnul libsimple_strnchrnul
#endif
+/**
+ * Scans for a character in a string, the scan is case-insensitive
+ *
+ * @param s The string to scan
+ * @param c The character for scan for
+ * @param n Truncate `s` to this length if it is longer
+ * @return `s` with a minimal offset such that `tolower(*r) == tolower(c) || !*r`,
+ * where `r` is the returned pointer, however if no such offset
+ * exists within the first `n` bytes, `&s[n]` is returned
+ */
_LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __nonnull__, __returns_nonnull__, __warn_unused_result__)))
-char *libsimple_strncasechrnul(const char *, int, size_t);
+char *libsimple_strncasechrnul(const char *, int, size_t); /* TODO doc */
#ifndef strncasechrnul
# define strncasechrnul libsimple_strncasechrnul
#endif
+/**
+ * Scans for a character in a string, the scan is case-sensitive
+ *
+ * @param s The string to scan
+ * @param c The character for scan for
+ * @param n Truncate `s` to this length if it is longer
+ * @return `s` with a maximal offset such that `*r == c`,
+ * where `r` is the returned pointer, `NULL` if no such offset exists
+ */
_LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __nonnull__, __warn_unused_result__)))
-char *libsimple_strrnchr(const char *, int, size_t);
+char *libsimple_strrnchr(const char *, int, size_t); /* TODO doc */
#ifndef strrnchr
# define strrnchr libsimple_strrnchr
#endif
+/**
+ * Scans for a character in a string, the scan is case-insensitive
+ *
+ * @param s The string to scan
+ * @param c The character for scan for
+ * @param n Truncate `s` to this length if it is longer
+ * @return `s` with a maximal offset such that `tolower(*r) == tolower(c)`,
+ * where `r` is the returned pointer, `NULL` if no such offset exists
+ */
_LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __nonnull__, __warn_unused_result__)))
-char *libsimple_strrncasechr(const char *, int, size_t);
+char *libsimple_strrncasechr(const char *, int, size_t); /* TODO doc */
#ifndef strrncasechr
# define strrncasechr libsimple_strrncasechr
#endif
+/**
+ * Scans for the end of a string
+ *
+ * @param s The string
+ * @param n Truncate `s` to this length if it is longer
+ * @return `s` with an offset such `!*r`, where `r`
+ * is the returned pointer, however if there
+ * is not NUL byte within the first `n` bytes
+ * if `s`, `&s[n]` is returned
+ */
_LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __nonnull__, __returns_nonnull__, __warn_unused_result__)))
-char *libsimple_strnend(const char *, size_t);
+char *libsimple_strnend(const char *, size_t); /* TODO doc */
#ifndef strnend
# define strnend libsimple_strnend
#endif
+/**
+ * Checks the beginning of a string, the comparison is case-sensitive
+ *
+ * @param s The string the check
+ * @param t The string `s` should begin with
+ * @param n Truncate `s` to this length if it is longer
+ * @return 1 if `s` starts with `t`, 0 otherwise
+ */
_LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __nonnull__, __warn_unused_result__)))
-char *libsimple_strnstr(const char *, const char *, size_t);
-#ifndef strnstr
-# define strnstr libsimple_strnstr
+int libsimple_strnstarts(const char *, const char *, size_t); /* TODO doc */
+#ifndef strnstarts
+# define strnstarts libsimple_strnstarts
#endif
+/**
+ * Checks the beginning of a string, the comparison is case-insensitive
+ *
+ * @param s The string the check
+ * @param t The string `s` should begin with
+ * @param n Truncate `s` to this length if it is longer
+ * @return 1 if `s` starts with `t`, 0 otherwise
+ */
_LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __nonnull__, __warn_unused_result__)))
-char *libsimple_strncasestr(const char *, const char *, size_t);
-#ifndef strncasestr
-# define strncasestr libsimple_strncasestr
+int libsimple_strncasestarts(const char *, const char *, size_t); /* TODO doc */
+#ifndef strncasestarts
+# define strncasestarts libsimple_strncasestarts
#endif
+/**
+ * Checks the end of a string, the comparison is case-sensitive
+ *
+ * @param s The string the check
+ * @param t The string `s` should begin with
+ * @param n Truncate `s` to this length if it is longer
+ * @return 1 if `s` ends with `t`, 0 otherwise
+ */
_LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __nonnull__, __warn_unused_result__)))
-char *libsimple_strrnstr(const char *, const char *, size_t);
-#ifndef strrnstr
-# define strrnstr libsimple_strrnstr
+int libsimple_strnends(const char *, const char *, size_t); /* TODO doc */
+#ifndef strnends
+# define strnends libsimple_strnends
#endif
+/**
+ * Checks the end of a string, the comparison is case-insensitive
+ *
+ * @param s The string the check
+ * @param t The string `s` should begin with
+ * @param n Truncate `s` to this length if it is longer
+ * @return 1 if `s` end with `t`, 0 otherwise
+ */
_LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __nonnull__, __warn_unused_result__)))
-char *libsimple_strrncasestr(const char *, const char *, size_t);
-#ifndef strrncasestr
-# define strrncasestr libsimple_strrncasestr
+int libsimple_strncaseends(const char *, const char *, size_t); /* TODO doc */
+#ifndef strncaseends
+# define strncaseends libsimple_strncaseends
#endif
+/**
+ * Scans a string for a substring, the comparison is case-sensitive
+ *
+ * @param haystack The string to search
+ * @param needle The string to search for
+ * @param n Truncate `haystack` to this length if it is longer
+ * @return `haystack` with a minimal offset such that the returned
+ * pointer begins with `needle`, `NULL` if no such offset
+ * exists
+ */
_LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __nonnull__, __warn_unused_result__)))
-int libsimple_strnstarts(const char *, const char *, size_t);
-#ifndef strnstarts
-# define strnstarts libsimple_strnstarts
+char *libsimple_strnstr(const char *, const char *, size_t); /* TODO doc */
+#ifndef strnstr
+# define strnstr libsimple_strnstr
#endif
+/**
+ * Scans a string for a substring, the comparison is case-insensitive
+ *
+ * @param haystack The string to search
+ * @param needle The string to search for
+ * @param n Truncate `haystack` to this length if it is longer
+ * @return `haystack` with a minimal offset such that the returned
+ * pointer begins with `needle`, `NULL` if no such offset
+ * exists
+ */
_LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __nonnull__, __warn_unused_result__)))
-int libsimple_strncasestarts(const char *, const char *, size_t);
-#ifndef strncasestarts
-# define strncasestarts libsimple_strncasestarts
+char *libsimple_strncasestr(const char *, const char *, size_t); /* TODO doc */
+#ifndef strncasestr
+# define strncasestr libsimple_strncasestr
#endif
+/**
+ * Scans a string for a substring, the comparison is case-sensitive
+ *
+ * @param haystack The string to search
+ * @param needle The string to search for
+ * @param n Truncate `haystack` to this length if it is longer
+ * @return `haystack` with a maximal offset such that the returned
+ * pointer begins with `needle`, `NULL` if no such offset
+ * exists
+ */
_LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __nonnull__, __warn_unused_result__)))
-int libsimple_strnends(const char *, const char *, size_t);
-#ifndef strnends
-# define strnends libsimple_strnends
+char *libsimple_strrnstr(const char *, const char *, size_t); /* TODO doc */
+#ifndef strrnstr
+# define strrnstr libsimple_strrnstr
#endif
+/**
+ * Scans a string for a substring, the comparison is case-insensitive
+ *
+ * @param haystack The string to search
+ * @param needle The string to search for
+ * @param n Truncate `haystack` to this length if it is longer
+ * @return `haystack` with a maximal offset such that the returned
+ * pointer begins with `needle`, `NULL` if no such offset
+ * exists
+ */
_LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __nonnull__, __warn_unused_result__)))
-int libsimple_strncaseends(const char *, const char *, size_t);
-#ifndef strncaseends
-# define strncaseends libsimple_strncaseends
+char *libsimple_strrncasestr(const char *, const char *, size_t); /* TODO doc */
+#ifndef strrncasestr
+# define strrncasestr libsimple_strrncasestr
#endif
+/**
+ * Compare two strings, and support `NULL` as less than
+ * the empty string, the comparison is case-sensitive
+ *
+ * @param a One of the strings, may be `NULL`
+ * @param b The other string, may be `NULL`
+ * @param n Truncate each input string that is
+ * longer than this to this length
+ * @return A negative value if `a` is less than `b`,
+ * a positive value if `a` is greater than `b`,
+ * 0 otherwise
+ */
_LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __warn_unused_result__)))
static inline int libsimple_strncmpnul(const char *__a, const char *__b, size_t __n)
-{ return (!__a || !__b) ? !__b - !__a : strncmp(__a, __b, __n); }
+{ return (!__a || !__b) ? !__b - !__a : strncmp(__a, __b, __n); } /* TODO doc */
#ifndef strncmpnul
# define strncmpnul libsimple_strncmpnul
#endif
+/**
+ * Compare two strings, and support `NULL` as less than
+ * the empty string, the comparison is case-insensitive
+ *
+ * @param a One of the strings, may be `NULL`
+ * @param b The other string, may be `NULL`
+ * @param n Truncate each input string that is
+ * longer than this to this length
+ * @return A negative value if `a` is less than `b`,
+ * a positive value if `a` is greater than `b`,
+ * 0 otherwise
+ */
_LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __warn_unused_result__)))
-static inline int libsimple_strncasecmpnul(const char *__a, const char *__b, size_t __n)
+static inline int libsimple_strncasecmpnul(const char *__a, const char *__b, size_t __n) /* TODO doc */
{ return (!__a || !__b) ? !__b - !__a : strncasecmp(__a, __b, __n); }
#ifndef strncasecmpnul
# define strncasecmpnul libsimple_strncasecmpnul
#endif
+/**
+ * Compare two strings, without support for `NULL`,
+ * the comparison is case-sensitive
+ *
+ * @param a One of the strings, may not be `NULL`
+ * @param b The other string, may not be `NULL`
+ * @param n Truncate each input string that is
+ * longer than this to this length
+ * @return 1 if the strings are equal, 0 otherwise
+ */
_LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __nonnull__, __warn_unused_result__)))
static inline int libsimple_strneq(const char *__a, const char *__b, size_t __n)
{ return !strncmp(__a, __b, __n); }
@@ -130,6 +304,16 @@ static inline int libsimple_strneq(const char *__a, const char *__b, size_t __n)
#endif
+/**
+ * Compare two strings, with support for `NULL`,
+ * the comparison is case-sensitive
+ *
+ * @param a One of the strings, may be `NULL`
+ * @param b The other string, may be `NULL`
+ * @param n Truncate each input string that is
+ * longer than this to this length
+ * @return 1 if the strings are equal, 0 otherwise
+ */
_LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __warn_unused_result__)))
static inline int libsimple_strneqnul(const char *__a, const char *__b, size_t __n)
{ return !strncmpnul(__a, __b, __n); }
@@ -138,6 +322,16 @@ static inline int libsimple_strneqnul(const char *__a, const char *__b, size_t _
#endif
+/**
+ * Compare two strings, without support for `NULL`,
+ * the comparison is case-insensitive
+ *
+ * @param a One of the strings, may not be `NULL`
+ * @param b The other string, may not be `NULL`
+ * @param n Truncate each input string that is
+ * longer than this to this length
+ * @return 1 if the strings are equal, 0 otherwise
+ */
_LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __nonnull__, __warn_unused_result__)))
static inline int libsimple_strncaseeq(const char *__a, const char *__b, size_t __n)
{ return !strncasecmp(__a, __b, __n); }
@@ -146,6 +340,16 @@ static inline int libsimple_strncaseeq(const char *__a, const char *__b, size_t
#endif
+/**
+ * Compare two strings, with support for `NULL`,
+ * the comparison is case-insensitive
+ *
+ * @param a One of the strings, may be `NULL`
+ * @param b The other string, may be `NULL`
+ * @param n Truncate each input string that is
+ * longer than this to this length
+ * @return 1 if the strings are equal, 0 otherwise
+ */
_LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __warn_unused_result__)))
static inline int libsimple_strncaseeqnul(const char *__a, const char *__b, size_t __n)
{ return !strncasecmpnul(__a, __b, __n); }
@@ -154,6 +358,16 @@ static inline int libsimple_strncaseeqnul(const char *__a, const char *__b, size
#endif
+/**
+ * Compares the beginning of two strings, the comparison is case-sensitive
+ *
+ * @param a One of the strings
+ * @param b The other string
+ * @param n Truncate each input string that is
+ * longer than this to this length
+ * @return The number of bytes `a` and `b` have
+ * in common in their beginnings
+ */
_LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __nonnull__, __warn_unused_result__)))
size_t libsimple_strneqlen(const char *, const char *, size_t);
#ifndef strneqlen
@@ -161,6 +375,16 @@ size_t libsimple_strneqlen(const char *, const char *, size_t);
#endif
+/**
+ * Compares the beginning of two strings, the comparison is case-insensitive
+ *
+ * @param a One of the strings
+ * @param b The other string
+ * @param n Truncate each input string that is
+ * longer than this to this length
+ * @return The number of bytes `a` and `b` have
+ * in common in their beginnings
+ */
_LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __nonnull__, __warn_unused_result__)))
size_t libsimple_strncaseeqlen(const char *, const char *, size_t);
#ifndef strncaseeqlen
@@ -168,6 +392,16 @@ size_t libsimple_strncaseeqlen(const char *, const char *, size_t);
#endif
+/**
+ * Compares the end of two strings, the comparison is case-sensitive
+ *
+ * @param a One of the strings
+ * @param b The other string
+ * @param n Truncate each input string that is
+ * longer than this to this length
+ * @return The number of bytes `a` and `b` have
+ * in common in their ends
+ */
_LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __nonnull__, __warn_unused_result__)))
static inline size_t libsimple_strrneqlen(const char *__a, const char *__b, size_t __n)
{ return memreqlen(__a, (strnlen)(__a, __n), __b, (strnlen)(__b, __n)); }
@@ -176,6 +410,16 @@ static inline size_t libsimple_strrneqlen(const char *__a, const char *__b, size
#endif
+/**
+ * Compares the end of two strings, the comparison is case-insensitive
+ *
+ * @param a One of the strings
+ * @param b The other string
+ * @param n Truncate each input string that is
+ * longer than this to this length
+ * @return The number of bytes `a` and `b` have
+ * in common in their ends
+ */
_LIBSIMPLE_GCC_ONLY(__attribute__((__pure__, __nonnull__, __warn_unused_result__)))
static inline size_t libsimple_strrncaseeqlen(const char *__a, const char *__b, size_t __n)
{ return memrcaseeqlen(__a, (strnlen)(__a, __n), __b, (strnlen)(__b, __n)); }
diff --git a/man/libsimple_memcaseeq.3 b/man/libsimple_memcaseeq.3
index 314fd63..6e30970 100644
--- a/man/libsimple_memcaseeq.3
+++ b/man/libsimple_memcaseeq.3
@@ -1,4 +1,4 @@
-.TH LIBSIMPLE_MEMCASEEQ 3 2018-10-21 libsimple
+.TH LIBSIMPLE_MEMCASEEQ 3 2018-10-23 libsimple
.SH NAME
libsimple_memcaseeq \- check two memory segments for equality
.SH SYNOPSIS
@@ -72,4 +72,6 @@ None.
.SH SEE ALSO
.BR libsimple_memeq (3),
.BR libsimple_memcaseeqlen (3),
-.BR libsimple_memcasecmp (3)
+.BR libsimple_memcasecmp (3),
+.BR libsimple_strncaseeq (3),
+.BR libsimple_strcaseeq (3)
diff --git a/man/libsimple_memcaseeqlen.3 b/man/libsimple_memcaseeqlen.3
index 410da7d..f8779c8 100644
--- a/man/libsimple_memcaseeqlen.3
+++ b/man/libsimple_memcaseeqlen.3
@@ -1,4 +1,4 @@
-.TH LIBSIMPLE_MEMCASEEQLEN 3 2018-10-21 libsimple
+.TH LIBSIMPLE_MEMCASEEQLEN 3 2018-10-23 libsimple
.SH NAME
libsimple_memcaseeqlen \- check initial commonality
.SH SYNOPSIS
@@ -73,4 +73,6 @@ None.
.SH SEE ALSO
.BR libsimple_memcaseeq (3),
.BR libsimple_memeqlen (3),
-.BR libsimple_memrcaseeqlen (3)
+.BR libsimple_memrcaseeqlen (3),
+.BR libsimple_strncaseeqlen (3),
+.BR libsimple_strcaseeqlen (3)
diff --git a/man/libsimple_memeq.3 b/man/libsimple_memeq.3
index d0c2a99..6631328 100644
--- a/man/libsimple_memeq.3
+++ b/man/libsimple_memeq.3
@@ -1,4 +1,4 @@
-.TH LIBSIMPLE_MEMEQ 3 2018-10-21 libsimple
+.TH LIBSIMPLE_MEMEQ 3 2018-10-23 libsimple
.SH NAME
libsimple_memeq \- check two memory segments for equality
.SH SYNOPSIS
@@ -71,4 +71,6 @@ None.
.SH SEE ALSO
.BR libsimple_memcaseeq (3),
.BR libsimple_memeqlen (3),
+.BR libsimple_strneq (3),
+.BR libsimple_streq (3),
.BR memcmp (3)
diff --git a/man/libsimple_memeqlen.3 b/man/libsimple_memeqlen.3
index 277e382..6a03808 100644
--- a/man/libsimple_memeqlen.3
+++ b/man/libsimple_memeqlen.3
@@ -1,4 +1,4 @@
-.TH LIBSIMPLE_MEMEQLEN 3 2018-10-21 libsimple
+.TH LIBSIMPLE_MEMEQLEN 3 2018-10-23 libsimple
.SH NAME
libsimple_memeqlen \- check initial commonality
.SH SYNOPSIS
@@ -73,4 +73,6 @@ None.
.SH SEE ALSO
.BR libsimple_memeq (3),
.BR libsimple_memcaseeqlen (3),
-.BR libsimple_memreqlen (3)
+.BR libsimple_memreqlen (3),
+.BR libsimple_strneqlen (3),
+.BR libsimple_streqlen (3)
diff --git a/man/libsimple_memrcaseeqlen.3 b/man/libsimple_memrcaseeqlen.3
index ce6838c..9991e05 100644
--- a/man/libsimple_memrcaseeqlen.3
+++ b/man/libsimple_memrcaseeqlen.3
@@ -1,4 +1,4 @@
-.TH LIBSIMPLE_MEMRCASEEQLEN 3 2018-10-21 libsimple
+.TH LIBSIMPLE_MEMRCASEEQLEN 3 2018-10-23 libsimple
.SH NAME
libsimple_memrcaseeqlen \- check terminal commonality
.SH SYNOPSIS
@@ -72,4 +72,6 @@ None.
None.
.SH SEE ALSO
.BR libsimple_memreqlen (3),
-.BR libsimple_memcaseeqlen (3)
+.BR libsimple_memcaseeqlen (3),
+.BR libsimple_strrncaseeqlen (3),
+.BR libsimple_strrcaseeqlen (3)
diff --git a/man/libsimple_memreqlen.3 b/man/libsimple_memreqlen.3
index 80ae98e..93b49b4 100644
--- a/man/libsimple_memreqlen.3
+++ b/man/libsimple_memreqlen.3
@@ -1,4 +1,4 @@
-.TH LIBSIMPLE_MEMREQLEN 3 2018-10-21 libsimple
+.TH LIBSIMPLE_MEMREQLEN 3 2018-10-23 libsimple
.SH NAME
libsimple_memreqlen \- check terminal commonality
.SH SYNOPSIS
@@ -72,4 +72,6 @@ None.
None.
.SH SEE ALSO
.BR libsimple_memrcaseeqlen (3),
-.BR libsimple_memeqlen (3)
+.BR libsimple_memeqlen (3),
+.BR libsimple_strrneqlen (3),
+.BR libsimple_strreqlen (3)
diff --git a/man/libsimple_strcaseeq.3 b/man/libsimple_strcaseeq.3
index d38b439..c3ad68b 100644
--- a/man/libsimple_strcaseeq.3
+++ b/man/libsimple_strcaseeq.3
@@ -1,4 +1,4 @@
-.TH LIBSIMPLE_STRCASEEQ 3 2018-10-21 libsimple
+.TH LIBSIMPLE_STRCASEEQ 3 2018-10-23 libsimple
.SH NAME
libsimple_strcaseeq \- compare two strings
.SH SYNOPSIS
@@ -70,4 +70,6 @@ None.
.BR libsimple_strcaseeqnul (3),
.BR libsimple_streq (3),
.BR libsimple_strcaseeqlen (3),
+.BR libsimple_strncaseeq (3),
+.BR libsimple_memcaseeq (3),
.BR strcasecmp (3)
diff --git a/man/libsimple_strcaseeqlen.3 b/man/libsimple_strcaseeqlen.3
index 6ff8e18..6adba9c 100644
--- a/man/libsimple_strcaseeqlen.3
+++ b/man/libsimple_strcaseeqlen.3
@@ -1,4 +1,4 @@
-.TH LIBSIMPLE_STRCASEEQLEN 3 2018-10-21 libsimple
+.TH LIBSIMPLE_STRCASEEQLEN 3 2018-10-23 libsimple
.SH NAME
libsimple_strcaseeqlen \- check initial commonality
.SH SYNOPSIS
@@ -7,8 +7,8 @@ libsimple_strcaseeqlen \- check initial commonality
size_t libsimple_strcaseeqlen(const char *\fIa\fP, const char *\fIb\fP);
-#ifndef memrcaseeqlen
-# define memrcaseeqlen libsimple_strcaseeqlen
+#ifndef strcaseeqlen
+# define strcaseeqlen libsimple_strcaseeqlen
#endif
.fi
.PP
@@ -67,5 +67,8 @@ None.
.SH BUGS
None.
.SH SEE ALSO
+.BR libsimple_strcaseeq (3),
.BR libsimple_streqlen (3),
-.BR libsimple_strrcaseeqlen (3)
+.BR libsimple_strrcaseeqlen (3),
+.BR libsimple_strncaseeqlen (3),
+.BR libsimple_memcaseeqlen (3)
diff --git a/man/libsimple_strcaseeqnul.3 b/man/libsimple_strcaseeqnul.3
index 17edb4b..f405def 100644
--- a/man/libsimple_strcaseeqnul.3
+++ b/man/libsimple_strcaseeqnul.3
@@ -1,4 +1,4 @@
-.TH LIBSIMPLE_STRCASEEQNUL 3 2018-10-21 libsimple
+.TH LIBSIMPLE_STRCASEEQNUL 3 2018-10-23 libsimple
.SH NAME
libsimple_strcaseeqnul \- compare two strings
.SH SYNOPSIS
@@ -70,4 +70,6 @@ None.
.BR libsimple_strcaseeq (3),
.BR libsimple_streqnul (3),
.BR libsimple_strcasecmpnul (3),
+.BR libsimple_strncaseeqnul (3),
+.BR libsimple_memcaseeq (3),
.BR strcasecmp (3)
diff --git a/man/libsimple_streq.3 b/man/libsimple_streq.3
index 7904860..602b633 100644
--- a/man/libsimple_streq.3
+++ b/man/libsimple_streq.3
@@ -1,4 +1,4 @@
-.TH LIBSIMPLE_STREQ 3 2018-10-21 libsimple
+.TH LIBSIMPLE_STREQ 3 2018-10-23 libsimple
.SH NAME
libsimple_streq \- compare two strings
.SH SYNOPSIS
@@ -68,6 +68,7 @@ None.
.SH SEE ALSO
.BR libsimple_streqnul (3),
.BR libsimple_strcaseeq (3),
-.BR libsimple_strcaseeq (3),
.BR libsimple_streqlen (3),
+.BR libsimple_strneq (3),
+.BR libsimple_memeq (3),
.BR strcmp (3)
diff --git a/man/libsimple_streqlen.3 b/man/libsimple_streqlen.3
index 78fee3e..cb92bc6 100644
--- a/man/libsimple_streqlen.3
+++ b/man/libsimple_streqlen.3
@@ -1,4 +1,4 @@
-.TH LIBSIMPLE_STREQLEN 3 2018-10-21 libsimple
+.TH LIBSIMPLE_STREQLEN 3 2018-10-23 libsimple
.SH NAME
libsimple_streqlen \- check initial commonality
.SH SYNOPSIS
@@ -7,8 +7,8 @@ libsimple_streqlen \- check initial commonality
size_t libsimple_streqlen(const char *\fIa\fP, const char *\fIb\fP);
-#ifndef memrcaseeqlen
-# define memrcaseeqlen libsimple_streqlen
+#ifndef streqlen
+# define streqlen libsimple_streqlen
#endif
.fi
.PP
@@ -67,5 +67,8 @@ None.
.SH BUGS
None.
.SH SEE ALSO
+.BR libsimple_streq (3),
.BR libsimple_strreqlen (3),
-.BR libsimple_strcaseeqlen (3)
+.BR libsimple_strcaseeqlen (3),
+.BR libsimple_strneqlen (3),
+.BR libsimple_memeqlen (3)
diff --git a/man/libsimple_streqnul.3 b/man/libsimple_streqnul.3
index df39a67..eef5291 100644
--- a/man/libsimple_streqnul.3
+++ b/man/libsimple_streqnul.3
@@ -1,4 +1,4 @@
-.TH LIBSIMPLE_STREQNUL 3 2018-10-21 libsimple
+.TH LIBSIMPLE_STREQNUL 3 2018-10-23 libsimple
.SH NAME
libsimple_streqnul \- compare two strings
.SH SYNOPSIS
@@ -69,4 +69,6 @@ None.
.BR libsimple_streq (3),
.BR libsimple_strcaseeqnul (3),
.BR libsimple_strcmpnul (3),
+.BR libsimple_strneqnul (3),
+.BR libsimple_memeq (3),
.BR strcmp (3)
diff --git a/man/libsimple_strncaseeq.3 b/man/libsimple_strncaseeq.3
new file mode 100644
index 0000000..f3b63cd
--- /dev/null
+++ b/man/libsimple_strncaseeq.3
@@ -0,0 +1,81 @@
+.TH LIBSIMPLE_STRNCASEEQ 3 2018-10-23 libsimple
+.SH NAME
+libsimple_strncaseeq \- compare two strings
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+static inline int libsimple_strncaseeq(const char *\fIa\fP, const char *\fIb\fP, size_t \fIn\fP);
+
+#ifndef strncaseeq
+# define strncaseeq libsimple_strncaseeq
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+.SH DESCRIPTION
+The
+.BR libsimple_strncaseeq ()
+function compares the strings
+.IR a ,
+truncated to
+.I n
+bytes unless it is shorter,
+and
+.IR b ,
+truncated to
+.I n
+bytes unless it is shorter,
+neither of which may be
+.BR NULL .
+.PP
+The comparison is case-insensitive.
+.IR "unsigned char *" s.
+.SH RETURN VALUE
+The
+.BR libsimple_strncaseeq ()
+function returns 1 if the strings are equals,
+with the possible exception of the case,
+otherwise it returns 0.
+.SH ERRORS
+The
+.BR libsimple_strncaseeq ()
+function cannot fail.
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface Attribute Value
+T{
+.BR libsimple_strncaseeq ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_strncaseeq ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_strncaseeq ()
+T} Async-cancel safety AC-Safe
+.TE
+.SH EXAMPLES
+None.
+.SH APPLICATION USAGE
+None.
+.SH RATIONALE
+None.
+.SH FUTURE DIRECTIONS
+None.
+.SH NOTES
+None.
+.SH BUGS
+None.
+.SH SEE ALSO
+.BR libsimple_strncaseeqnul (3),
+.BR libsimple_strneq (3),
+.BR libsimple_strncaseeqlen (3),
+.BR libsimple_strcaseeq (3),
+.BR libsimple_memcaseeq (3),
+.BR strncasecmp (3)
diff --git a/man/libsimple_strncaseeqlen.3 b/man/libsimple_strncaseeqlen.3
new file mode 100644
index 0000000..8fbc236
--- /dev/null
+++ b/man/libsimple_strncaseeqlen.3
@@ -0,0 +1,82 @@
+.TH LIBSIMPLE_STRNCASEEQLEN 3 2018-10-23 libsimple
+.SH NAME
+libsimple_strncaseeqlen \- check initial commonality
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+size_t libsimple_strncaseeqlen(const char *\fIa\fP, const char *\fIb\fP, size_t \fIn\fP);
+
+#ifndef strncaseeqlen
+# define strncaseeqlen libsimple_strncaseeqlen
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+.SH DESCRIPTION
+The
+.BR libsimple_strncaseeqlen ()
+function scans the number of bytes the string
+.IR a ,
+truncated to
+.I n
+bytes unless it is shorter,
+have in common the string
+.IR b ,
+truncated to
+.I n
+bytes unless it is shorter,
+at their beginnings.
+.PP
+The comparison is case-insensitive.
+.SH RETURN VALUE
+The
+.BR libsimple_strncaseeqlen ()
+function returns the number of bytes
+.I a
+and
+.I b
+(both truncated to
+.I n
+bytes) have in common at their beginnings.
+.SH ERRORS
+The
+.BR libsimple_strncaseeqlen ()
+function cannot fail.
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface Attribute Value
+T{
+.BR libsimple_strncaseeqlen ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_strncaseeqlen ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_strncaseeqlen ()
+T} Async-cancel safety AC-Safe
+.TE
+.SH EXAMPLES
+None.
+.SH APPLICATION USAGE
+None.
+.SH RATIONALE
+None.
+.SH FUTURE DIRECTIONS
+None.
+.SH NOTES
+None.
+.SH BUGS
+None.
+.SH SEE ALSO
+.BR libsimple_strcaseeq (3),
+.BR libsimple_streqlen (3),
+.BR libsimple_strrcaseeqlen (3),
+.BR libsimple_strcaseeqlen (3),
+.BR libsimple_memcaseeqlen (3)
diff --git a/man/libsimple_strncaseeqnul.3 b/man/libsimple_strncaseeqnul.3
new file mode 100644
index 0000000..0a9222a
--- /dev/null
+++ b/man/libsimple_strncaseeqnul.3
@@ -0,0 +1,81 @@
+.TH LIBSIMPLE_STRNCASEEQNUL 3 2018-10-23 libsimple
+.SH NAME
+libsimple_strncaseeqnul \- compare two strings
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+static inline int libsimple_strncaseeqnul(const char *\fIa\fP, const char *\fIb\fP, size_t \fIn\fP);
+
+#ifndef strncaseeqnul
+# define strncaseeqnul libsimple_strncaseeqnul
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+.SH DESCRIPTION
+The
+.BR libsimple_strncaseeqnul ()
+function compares the strings
+.IR a ,
+truncated to
+.I n
+bytes unless it is shorter,
+and
+.IR b ,
+truncated to
+.I n
+bytes unless it is shorter,
+both of which may be
+.BR NULL .
+.PP
+The comparison is case-insensitive.
+.IR "unsigned char *" s.
+.SH RETURN VALUE
+The
+.BR libsimple_strncaseeqnul ()
+function returns 1 if the strings are equals,
+with the possible exception of the case,
+otherwise it returns 0.
+.SH ERRORS
+The
+.BR libsimple_strncaseeqnul ()
+function cannot fail.
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface Attribute Value
+T{
+.BR libsimple_strncaseeqnul ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_strncaseeqnul ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_strncaseeqnul ()
+T} Async-cancel safety AC-Safe
+.TE
+.SH EXAMPLES
+None.
+.SH APPLICATION USAGE
+None.
+.SH RATIONALE
+None.
+.SH FUTURE DIRECTIONS
+None.
+.SH NOTES
+None.
+.SH BUGS
+None.
+.SH SEE ALSO
+.BR libsimple_strncaseeq (3),
+.BR libsimple_strneqnul (3),
+.BR libsimple_strncasecmpnul (3),
+.BR libsimple_strcaseeqnul (3),
+.BR libsimple_memcaseeq (3),
+.BR strncasecmp (3)
diff --git a/man/libsimple_strneq.3 b/man/libsimple_strneq.3
new file mode 100644
index 0000000..5b6eebf
--- /dev/null
+++ b/man/libsimple_strneq.3
@@ -0,0 +1,80 @@
+.TH LIBSIMPLE_STRNEQ 3 2018-10-23 libsimple
+.SH NAME
+libsimple_strneq \- compare two strings
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+static inline int libsimple_strneq(const char *\fIa\fP, const char *\fIb\fP, size_t \fIn\fP);
+
+#ifndef strneq
+# define strneq libsimple_strneq
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+.SH DESCRIPTION
+The
+.BR libsimple_strneq ()
+function compares the strings
+.IR a ,
+truncated to
+.I n
+bytes unless it is shorter,
+and
+.IR b ,
+truncated to
+.I n
+bytes unless it is shorter,
+neither of which may be
+.BR NULL .
+.PP
+The comparison is case-sensitive.
+.IR "unsigned char *" s.
+.SH RETURN VALUE
+The
+.BR libsimple_strneq ()
+function returns 1 if the strings are equals,
+otherwise it returns 0.
+.SH ERRORS
+The
+.BR libsimple_strneq ()
+function cannot fail.
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface Attribute Value
+T{
+.BR libsimple_strneq ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_strneq ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_strneq ()
+T} Async-cancel safety AC-Safe
+.TE
+.SH EXAMPLES
+None.
+.SH APPLICATION USAGE
+None.
+.SH RATIONALE
+None.
+.SH FUTURE DIRECTIONS
+None.
+.SH NOTES
+None.
+.SH BUGS
+None.
+.SH SEE ALSO
+.BR libsimple_strneqnul (3),
+.BR libsimple_strncaseeq (3),
+.BR libsimple_strneqlen (3),
+.BR libsimple_streq (3),
+.BR libsimple_memeq (3),
+.BR strncmp (3)
diff --git a/man/libsimple_strneqlen.3 b/man/libsimple_strneqlen.3
new file mode 100644
index 0000000..df01480
--- /dev/null
+++ b/man/libsimple_strneqlen.3
@@ -0,0 +1,82 @@
+.TH LIBSIMPLE_STRNEQLEN 3 2018-10-23 libsimple
+.SH NAME
+libsimple_strneqlen \- check initial commonality
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+size_t libsimple_strneqlen(const char *\fIa\fP, const char *\fIb\fP, size_t \fIn\fP);
+
+#ifndef strneqlen
+# define strneqlen libsimple_strneqlen
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+.SH DESCRIPTION
+The
+.BR libsimple_strneqlen ()
+function scans the number of bytes the string
+.IR a ,
+truncated to
+.I n
+bytes unless it is shorter,
+have in common the string
+.IR b ,
+truncated to
+.I n
+bytes unless it is shorter,
+at their beginnings.
+.PP
+The comparison is case-sensitive.
+.SH RETURN VALUE
+The
+.BR libsimple_strneqlen ()
+function returns the number of bytes
+.I a
+and
+.I b
+(both truncated to
+.I n
+bytes) have in common at their beginnings.
+.SH ERRORS
+The
+.BR libsimple_strneqlen ()
+function cannot fail.
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface Attribute Value
+T{
+.BR libsimple_strneqlen ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_strneqlen ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_strneqlen ()
+T} Async-cancel safety AC-Safe
+.TE
+.SH EXAMPLES
+None.
+.SH APPLICATION USAGE
+None.
+.SH RATIONALE
+None.
+.SH FUTURE DIRECTIONS
+None.
+.SH NOTES
+None.
+.SH BUGS
+None.
+.SH SEE ALSO
+.BR libsimple_streq (3),
+.BR libsimple_strreqlen (3),
+.BR libsimple_strcaseeqlen (3),
+.BR libsimple_streqlen (3),
+.BR libsimple_memeqlen (3)
diff --git a/man/libsimple_strneqnul.3 b/man/libsimple_strneqnul.3
new file mode 100644
index 0000000..d01712f
--- /dev/null
+++ b/man/libsimple_strneqnul.3
@@ -0,0 +1,80 @@
+.TH LIBSIMPLE_STRNEQNUL 3 2018-10-23 libsimple
+.SH NAME
+libsimple_strneqnul \- compare two strings
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+static inline int libsimple_strneqnul(const char *\fIa\fP, const char *\fIb\fP, size_t \fIn\fP);
+
+#ifndef strneqnul
+# define strneqnul libsimple_strneqnul
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+.SH DESCRIPTION
+The
+.BR libsimple_strneqnul ()
+function compares the strings
+.IR a ,
+truncated to
+.I n
+bytes unless it is shorter,
+and
+.IR b ,
+truncated to
+.I n
+bytes unless it is shorter,
+both of which may be
+.BR NULL .
+.PP
+The comparison is case-sensitive.
+.IR "unsigned char *" s.
+.SH RETURN VALUE
+The
+.BR libsimple_strneqnul ()
+function returns 1 if the strings are equals,
+otherwise it returns 0.
+.SH ERRORS
+The
+.BR libsimple_strneqnul ()
+function cannot fail.
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface Attribute Value
+T{
+.BR libsimple_strneqnul ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_strneqnul ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_strneqnul ()
+T} Async-cancel safety AC-Safe
+.TE
+.SH EXAMPLES
+None.
+.SH APPLICATION USAGE
+None.
+.SH RATIONALE
+None.
+.SH FUTURE DIRECTIONS
+None.
+.SH NOTES
+None.
+.SH BUGS
+None.
+.SH SEE ALSO
+.BR libsimple_strneq (3),
+.BR libsimple_strncaseeqnul (3),
+.BR libsimple_strncmpnul (3),
+.BR libsimple_streqnul (3),
+.BR libsimple_memeq (3),
+.BR strncmp (3)
diff --git a/man/libsimple_strrcaseeqlen.3 b/man/libsimple_strrcaseeqlen.3
index 138954d..551debe 100644
--- a/man/libsimple_strrcaseeqlen.3
+++ b/man/libsimple_strrcaseeqlen.3
@@ -1,4 +1,4 @@
-.TH LIBSIMPLE_STRRCASEEQLEN 3 2018-10-21 libsimple
+.TH LIBSIMPLE_STRRCASEEQLEN 3 2018-10-23 libsimple
.SH NAME
libsimple_strrcaseeqlen \- check terminal commonality
.SH SYNOPSIS
@@ -68,4 +68,6 @@ None.
None.
.SH SEE ALSO
.BR libsimple_strreqlen (3),
-.BR libsimple_strcaseeqlen (3)
+.BR libsimple_strcaseeqlen (3),
+.BR libsimple_strrncaseeqlen (3),
+.BR libsimple_memrcaseeqlen (3)
diff --git a/man/libsimple_strreqlen.3 b/man/libsimple_strreqlen.3
index a51a00c..3fa4105 100644
--- a/man/libsimple_strreqlen.3
+++ b/man/libsimple_strreqlen.3
@@ -1,4 +1,4 @@
-.TH LIBSIMPLE_STRREQLEN 3 2018-10-21 libsimple
+.TH LIBSIMPLE_STRREQLEN 3 2018-10-23 libsimple
.SH NAME
libsimple_strreqlen \- check terminal commonality
.SH SYNOPSIS
@@ -68,4 +68,6 @@ None.
None.
.SH SEE ALSO
.BR libsimple_strreqlen (3),
-.BR libsimple_streqlen (3)
+.BR libsimple_streqlen (3),
+.BR libsimple_strrneqlen (3),
+.BR libsimple_memreqlen (3)
diff --git a/man/libsimple_strrncaseeqlen.3 b/man/libsimple_strrncaseeqlen.3
new file mode 100644
index 0000000..d938154
--- /dev/null
+++ b/man/libsimple_strrncaseeqlen.3
@@ -0,0 +1,81 @@
+.TH LIBSIMPLE_STRRNCASEEQLEN 3 2018-10-23 libsimple
+.SH NAME
+libsimple_strrncaseeqlen \- check terminal commonality
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+static inline size_t libsimple_strrncaseeqlen(const char *\fIa\fP, const char *\fIb\fP, size_t \fIn\fP);
+
+#ifndef strrncaseeqlen
+# define strrncaseeqlen libsimple_strrncaseeqlen
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+.SH DESCRIPTION
+The
+.BR libsimple_strrncaseeqlen ()
+function scans the number of bytes the string
+.IR a ,
+truncated to
+.I n
+bytes unless it is shorter,
+have in common the string
+.IR b ,
+truncated to
+.I n
+bytes unless it is shorter,
+at their ends.
+.PP
+The comparison is case-insensitive.
+.SH RETURN VALUE
+The
+.BR libsimple_strrncaseeqlen ()
+function returns the number of bytes
+.I a
+and
+.I b
+(both truncated to
+.I n
+bytes) have in common at their ends.
+.SH ERRORS
+The
+.BR libsimple_strrncaseeqlen ()
+function cannot fail.
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface Attribute Value
+T{
+.BR libsimple_strrncaseeqlen ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_strrncaseeqlen ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_strrncaseeqlen ()
+T} Async-cancel safety AC-Safe
+.TE
+.SH EXAMPLES
+None.
+.SH APPLICATION USAGE
+None.
+.SH RATIONALE
+None.
+.SH FUTURE DIRECTIONS
+None.
+.SH NOTES
+None.
+.SH BUGS
+None.
+.SH SEE ALSO
+.BR libsimple_strrneqlen (3),
+.BR libsimple_strncaseeqlen (3),
+.BR libsimple_strrcaseeqlen (3),
+.BR libsimple_memrcaseeqlen (3)
diff --git a/man/libsimple_strrneqlen.3 b/man/libsimple_strrneqlen.3
new file mode 100644
index 0000000..6828fa0
--- /dev/null
+++ b/man/libsimple_strrneqlen.3
@@ -0,0 +1,81 @@
+.TH LIBSIMPLE_STRRNEQLEN 3 2018-10-23 libsimple
+.SH NAME
+libsimple_strrneqlen \- check terminal commonality
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+static inline size_t libsimple_strrneqlen(const char *\fIa\fP, const char *\fIb\fP, size_t \fIn\fP);
+
+#ifndef strrneqlen
+# define strrneqlen libsimple_strrneqlen
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+.SH DESCRIPTION
+The
+.BR libsimple_strrneqlen ()
+function scans the number of bytes the string
+.IR a ,
+truncated to
+.I n
+bytes unless it is shorter,
+have in common the string
+.IR b ,
+truncated to
+.I n
+bytes unless it is shorter,
+at their ends.
+.PP
+The comparison is case-sensitive.
+.SH RETURN VALUE
+The
+.BR libsimple_strrneqlen ()
+function returns the number of bytes
+.I a
+and
+.I b
+(both truncated to
+.I n
+bytes) have in common at their ends.
+.SH ERRORS
+The
+.BR libsimple_strrneqlen ()
+function cannot fail.
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface Attribute Value
+T{
+.BR libsimple_strrneqlen ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_strrneqlen ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_strrneqlen ()
+T} Async-cancel safety AC-Safe
+.TE
+.SH EXAMPLES
+None.
+.SH APPLICATION USAGE
+None.
+.SH RATIONALE
+None.
+.SH FUTURE DIRECTIONS
+None.
+.SH NOTES
+None.
+.SH BUGS
+None.
+.SH SEE ALSO
+.BR libsimple_strrneqlen (3),
+.BR libsimple_strneqlen (3),
+.BR libsimple_strreqlen (3),
+.BR libsimple_memreqlen (3)