aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man3/libsimple_memchr_inv.385
-rw-r--r--man3/libsimple_memrelem.31
-rw-r--r--man3/libsimple_memrelem_inv.31
-rw-r--r--man3/libsimple_rawmemelem.387
-rw-r--r--man3/libsimple_rawmemelem_inv.388
-rw-r--r--man3/libsimple_rawmemrelem.388
-rw-r--r--man3/libsimple_rawmemrelem_inv.389
-rw-r--r--man3/libsimple_strcasechr.31
-rw-r--r--man3/libsimple_strcasechr_inv.383
-rw-r--r--man3/libsimple_strchr_inv.383
-rw-r--r--man3/libsimple_strncasechr.31
-rw-r--r--man3/libsimple_strncasechr_inv.388
-rw-r--r--man3/libsimple_strnchr.35
-rw-r--r--man3/libsimple_strnchr_inv.388
-rw-r--r--man3/libsimple_strrcasechr.31
-rw-r--r--man3/libsimple_strrcasechr_inv.382
-rw-r--r--man3/libsimple_strrchr_inv.382
-rw-r--r--man3/libsimple_strrncasechr.31
-rw-r--r--man3/libsimple_strrncasechr_inv.387
-rw-r--r--man3/libsimple_strrnchr.35
-rw-r--r--man3/libsimple_strrnchr_inv.387
-rw-r--r--memchr_inv.c2
-rw-r--r--rawmemelem.c2
-rw-r--r--rawmemelem_inv.c2
-rw-r--r--rawmemrelem.c2
-rw-r--r--rawmemrelem_inv.c2
-rw-r--r--strcasechr_inv.c2
-rw-r--r--strchr_inv.c2
-rw-r--r--strncasechr_inv.c2
-rw-r--r--strnchr_inv.c2
-rw-r--r--strrcasechr_inv.c2
-rw-r--r--strrchr_inv.c2
-rw-r--r--strrncasechr_inv.c2
-rw-r--r--strrnchr_inv.c2
34 files changed, 1142 insertions, 17 deletions
diff --git a/man3/libsimple_memchr_inv.3 b/man3/libsimple_memchr_inv.3
new file mode 100644
index 0000000..23c8271
--- /dev/null
+++ b/man3/libsimple_memchr_inv.3
@@ -0,0 +1,85 @@
+.TH LIBSIMPLE_MEMCHR_INV 3 2018-11-24 libsimple
+.SH NAME
+libsimple_memchr_inv \- find different byte in memory
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+void *libsimple_memchr_inv(const void *\fIs\fP, int \fIc\fP, size_t \fIn\fP);
+
+#ifndef memchr_inv
+# define memchr_inv libsimple_memchr_inv
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+.SH DESCRIPTION
+The
+.BR libsimple_memchr_inv ()
+function scans the memory segment
+.IR s ,
+with the size
+.IR n ,
+for the first occurence of any byte
+other than
+.I c
+(it is converted to a
+.BR char ).
+.PP
+The comparison is case-sensitive.
+.SH RETURN VALUE
+The
+.BR libsimple_memchr_inv ()
+function returns the pointer
+.I s
+with a minimal offset such that
+.IR *r!=c ,
+where
+.I r
+is the returned pointer.
+If no such offset exists,
+.B NULL
+is returned.
+.SH ERRORS
+The
+.BR libsimple_memchr_inv ()
+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_memchr_inv ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_memchr_inv ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_memchr_inv ()
+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_memcasechr_inv (3),
+.BR libsimple_memrchr_inv (3),
+.BR libsimple_rawmemchr_inv (3),
+.BR libsimple_memscan_inv (3),
+.BR libsimple_strnchr_inv (3),
+.BR libsimple_strchr_inv (3),
+.BR memchr (3)
diff --git a/man3/libsimple_memrelem.3 b/man3/libsimple_memrelem.3
index 3718b19..f6681e9 100644
--- a/man3/libsimple_memrelem.3
+++ b/man3/libsimple_memrelem.3
@@ -80,6 +80,7 @@ None.
None.
.SH SEE ALSO
.BR libsimple_memrelem_inv (3),
+.BR libsimple_rawmemrelem (3),
.BR libsimple_memelem (3),
.BR libsimple_memrmem (3),
.BR libsimple_memrchr (3)
diff --git a/man3/libsimple_memrelem_inv.3 b/man3/libsimple_memrelem_inv.3
index 71618c2..02b4be7 100644
--- a/man3/libsimple_memrelem_inv.3
+++ b/man3/libsimple_memrelem_inv.3
@@ -81,6 +81,7 @@ None.
None.
.SH SEE ALSO
.BR libsimple_memrelem (3),
+.BR libsimple_rawmemrelem_inv (3),
.BR libsimple_memelem_inv (3),
.BR libsimple_memrmem_inv (3),
.BR libsimple_memrchr_inv (3)
diff --git a/man3/libsimple_rawmemelem.3 b/man3/libsimple_rawmemelem.3
new file mode 100644
index 0000000..4e83ed0
--- /dev/null
+++ b/man3/libsimple_rawmemelem.3
@@ -0,0 +1,87 @@
+.TH LIBSIMPLE_RAWMEMELEM 3 2018-11-24 libsimple
+.SH NAME
+libsimple_rawmemelem \- find aligned byte string in memory
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+void *libsimple_rawmemelem(const void *\fIhaystack\fP, const void *\fIneedle\fP, size_t \fInneedle\fP);
+
+#ifndef rawmemelem
+# define rawmemelem libsimple_rawmemelem
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+.SH DESCRIPTION
+The
+.BR libsimple_rawmemelem ()
+function scans the memory segment
+.IR haystack ,
+for the first occurence of the byte string
+.I needle
+with the size
+.IR nneedle ,
+and with an offset equivalent to zero modulo
+.IR nneedle .
+.PP
+The
+.BR libsimple_rawmemelem ()
+function assumes there is at least one
+occurence, its behaviour is undefined
+if this is not the case.
+.PP
+The comparison is case-sensitive.
+.SH RETURN VALUE
+The
+.BR libsimple_rawmemelem ()
+function returns the pointer
+.I s
+with a minimal offset such that
+.IR !memcmp(r,needle,nneedle) ,
+where
+.I r
+is the returned pointer, and such that
+the offset is equivalent to zero modulo
+.IR nneedle .
+If no such offset exists, the behaviour is undefined.
+.SH ERRORS
+The
+.BR libsimple_rawmemelem ()
+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_rawmemelem ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_rawmemelem ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_rawmemelem ()
+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_rawmemelem_inv (3),
+.BR libsimple_rawmemrelem (3),
+.BR libsimple_memelem (3),
+.BR libsimple_rawmemchr (3)
diff --git a/man3/libsimple_rawmemelem_inv.3 b/man3/libsimple_rawmemelem_inv.3
new file mode 100644
index 0000000..20ed595
--- /dev/null
+++ b/man3/libsimple_rawmemelem_inv.3
@@ -0,0 +1,88 @@
+.TH LIBSIMPLE_RAWMEMELEM_INV 3 2018-11-24 libsimple
+.SH NAME
+libsimple_rawmemelem_inv \- find different aligned byte string in memory
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+void *libsimple_rawmemelem_inv(const void *\fIhaystack\fP, const void *\fIneedle\fP, size_t \fInneedle\fP);
+
+#ifndef rawmemelem_inv
+# define rawmemelem_inv libsimple_rawmemelem_inv
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+.SH DESCRIPTION
+The
+.BR libsimple_rawmemelem_inv ()
+function scans the memory segment
+.IR haystack ,
+for the first occurence of a byte string
+different from
+.I needle
+with the size
+.IR nneedle ,
+and with an offset equivalent to zero modulo
+.IR nneedle .
+.PP
+The
+.BR libsimple_rawmemchr ()
+function assumes there is at least one
+occurence, its behaviour is undefined
+if this is not the case.
+.PP
+The comparison is case-sensitive.
+.SH RETURN VALUE
+The
+.BR libsimple_rawmemelem_inv ()
+function returns the pointer
+.I s
+with a minimal offset such that
+.IR memcmp(r,needle,nneedle) ,
+where
+.I r
+is the returned pointer, and such that
+the offset is equivalent to zero modulo
+.IR nneedle .
+If no such offset exists, the behaviour is undefined.
+.SH ERRORS
+The
+.BR libsimple_rawmemelem_inv ()
+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_rawmemelem_inv ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_rawmemelem_inv ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_rawmemelem_inv ()
+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_rawmemelem (3),
+.BR libsimple_rawmemrelem_inv (3),
+.BR libsimple_memelem_inv (3),
+.BR libsimple_rawmemchr_inv (3)
diff --git a/man3/libsimple_rawmemrelem.3 b/man3/libsimple_rawmemrelem.3
new file mode 100644
index 0000000..0a179a8
--- /dev/null
+++ b/man3/libsimple_rawmemrelem.3
@@ -0,0 +1,88 @@
+.TH LIBSIMPLE_RAWMEMRELEM 3 2018-11-24 libsimple
+.SH NAME
+libsimple_rawmemrelem \- find aligned byte string in memory
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+void *libsimple_rawmemrelem(const void *\fIhaystack\fP, size_t \fInhaystack\fP, const void *\fIneedle\fP, size_t \fInneedle\fP);
+
+#ifndef rawmemrelem
+# define rawmemrelem libsimple_rawmemrelem
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+.SH DESCRIPTION
+The
+.BR libsimple_rawmemrelem ()
+function scans the memory segment
+.IR haystack ,
+with the size
+.IR nhaystack*nneedle ,
+for the last occurence of the byte string
+.I needle
+with the size
+.IR nneedle ,
+and with an offset equivalent to zero modulo
+.IR nneedle .
+The
+.BR libsimple_rawmemrelem ()
+function assumes there is at least one
+occurence, its behaviour is undefined
+if this is not the case.
+.PP
+The comparison is case-sensitive.
+.SH RETURN VALUE
+The
+.BR libsimple_rawmemrelem ()
+function returns the pointer
+.I s
+with a maximal offset such that
+.IR !memcmp(r,needle,nneedle) ,
+where
+.I r
+is the returned pointer, and such that
+the offset is equivalent to zero modulo
+.IR nneedle .
+If no such offset exists, the behaviour is undefined.
+.SH ERRORS
+The
+.BR libsimple_rawmemrelem ()
+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_rawmemrelem ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_rawmemrelem ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_rawmemrelem ()
+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_rawmemrelem_inv (3),
+.BR libsimple_memrelem (3),
+.BR libsimple_rawmemelem (3),
+.BR libsimple_rawmemrchr (3)
diff --git a/man3/libsimple_rawmemrelem_inv.3 b/man3/libsimple_rawmemrelem_inv.3
new file mode 100644
index 0000000..d2d1acf
--- /dev/null
+++ b/man3/libsimple_rawmemrelem_inv.3
@@ -0,0 +1,89 @@
+.TH LIBSIMPLE_RAWMEMRELEM_INV 3 2018-11-24 libsimple
+.SH NAME
+libsimple_rawmemrelem_inv \- find different aligned byte string in memory
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+void *libsimple_rawmemrelem_inv(const void *\fIhaystack\fP, size_t \fInhaystack\fP, const void *\fIneedle\fP, size_t \fInneedle\fP);
+
+#ifndef rawmemrelem_inv
+# define rawmemrelem_inv libsimple_rawmemrelem_inv
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+.SH DESCRIPTION
+The
+.BR libsimple_rawmemrelem_inv ()
+function scans the memory segment
+.IR haystack ,
+with the size
+.IR nhaystack*nneedle ,
+for the last occurence of a byte string
+different from
+.I needle
+with the size
+.IR nneedle ,
+and with an offset equivalent to zero modulo
+.IR nneedle .
+The
+.BR libsimple_rawmemrelem_inv ()
+function assumes there is at least one
+occurence, its behaviour is undefined
+if this is not the case.
+.PP
+The comparison is case-sensitive.
+.SH RETURN VALUE
+The
+.BR libsimple_rawmemrelem_inv ()
+function returns the pointer
+.I s
+with a maximal offset such that
+.IR memcmp(r,needle,nneedle) ,
+where
+.I r
+is the returned pointer, and such that
+the offset is equivalent to zero modulo
+.IR nneedle .
+If no such offset exists, the behaviour is undefined.
+.SH ERRORS
+The
+.BR libsimple_rawmemrelem_inv ()
+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_rawmemrelem_inv ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_rawmemrelem_inv ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_rawmemrelem_inv ()
+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_rawmemrelem (3),
+.BR libsimple_memrelem_inv (3),
+.BR libsimple_rawmemelem_inv (3),
+.BR libsimple_rawmemrchr_inv (3)
diff --git a/man3/libsimple_strcasechr.3 b/man3/libsimple_strcasechr.3
index 8d644a1..0f1a7f3 100644
--- a/man3/libsimple_strcasechr.3
+++ b/man3/libsimple_strcasechr.3
@@ -74,6 +74,7 @@ None.
.SH BUGS
None.
.SH SEE ALSO
+.BR libsimple_strcasechr_inv (3),
.BR libsimple_strcasechrnul (3),
.BR libsimple_strrcasechr (3),
.BR libsimple_strncasechr (3),
diff --git a/man3/libsimple_strcasechr_inv.3 b/man3/libsimple_strcasechr_inv.3
new file mode 100644
index 0000000..baf5574
--- /dev/null
+++ b/man3/libsimple_strcasechr_inv.3
@@ -0,0 +1,83 @@
+.TH LIBSIMPLE_STRCASECHR_INV 3 2018-11-25 libsimple
+.SH NAME
+libsimple_strcasechr_inv \- find a different character in a string
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+char *libsimple_strcasechr_inv(const char *\fIs\fP, int \fIc\fP);
+
+#ifndef strcasechr_inv
+# define strcasechr_inv libsimple_strcasechr_inv
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+.SH DESCRIPTION
+The
+.BR libsimple_strcasechr_inv ()
+function scans the string
+.I s
+for the first occurence of any character
+other than
+.I c
+(it is converted to a
+.BR char ).
+If no such character exist in the string,
+the string's end is returned.
+.PP
+The comparison is case-insensitive.
+.SH RETURN VALUE
+The
+.BR libsimple_strcasechr_inv ()
+function returns the pointer
+.I s
+with a minimal offset such that
+.IR tolower(*r)!=tolower(c) ,
+where
+.I r
+is the returned pointer, if no such
+offset exists, it returns
+.BR NULL .
+.SH ERRORS
+The
+.BR libsimple_strcasechr_inv ()
+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_strcasechr_inv ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_strcasechr_inv ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_strcasechr_inv ()
+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_strcasechr (3),
+.BR libsimple_strchr_inv (3),
+.BR libsimple_strcasechrnul_inv (3),
+.BR libsimple_strrcasechr_inv (3),
+.BR libsimple_strncasechr_inv (3),
+.BR libsimple_memcasechr_inv (3)
diff --git a/man3/libsimple_strchr_inv.3 b/man3/libsimple_strchr_inv.3
new file mode 100644
index 0000000..e1cdf53
--- /dev/null
+++ b/man3/libsimple_strchr_inv.3
@@ -0,0 +1,83 @@
+.TH LIBSIMPLE_STRCHR_INV 3 2018-11-25 libsimple
+.SH NAME
+libsimple_strchr_inv \- find a different character in a string
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+char *libsimple_strchr_inv(const char *\fIs\fP, int \fIc\fP);
+
+#ifndef strchr_inv
+# define strchr_inv libsimple_strchr_inv
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+.SH DESCRIPTION
+The
+.BR libsimple_strchr_inv ()
+function scans the string
+.I s
+for the first occurence of any character
+other than
+.I c
+(it is converted to a
+.BR char ).
+If no such character exist in the string,
+the string's end is returned.
+.PP
+The comparison is case-sensitive.
+.SH RETURN VALUE
+The
+.BR libsimple_strchr_inv ()
+function returns the pointer
+.I s
+with a minimal offset such that
+.IR *r!=c ,
+where
+.I r
+is the returned pointer, if no such
+offset exists, it returns
+.BR NULL .
+.SH ERRORS
+The
+.BR libsimple_strchr_inv ()
+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_strchr_inv ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_strchr_inv ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_strchr_inv ()
+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_strcasechr_inv (3),
+.BR libsimple_strchrnul_inv (3),
+.BR libsimple_strrchr_inv (3),
+.BR libsimple_strnchr_inv (3),
+.BR libsimple_memchr_inv (3),
+.BR strchr (3)
diff --git a/man3/libsimple_strncasechr.3 b/man3/libsimple_strncasechr.3
index 1a7716f..b0a1c96 100644
--- a/man3/libsimple_strncasechr.3
+++ b/man3/libsimple_strncasechr.3
@@ -79,6 +79,7 @@ None.
.SH BUGS
None.
.SH SEE ALSO
+.BR libsimple_strncasechr_inv (3),
.BR libsimple_strncasechrnul (3),
.BR libsimple_strrncasechr (3),
.BR libsimple_strnchr (3),
diff --git a/man3/libsimple_strncasechr_inv.3 b/man3/libsimple_strncasechr_inv.3
new file mode 100644
index 0000000..c23fe84
--- /dev/null
+++ b/man3/libsimple_strncasechr_inv.3
@@ -0,0 +1,88 @@
+.TH LIBSIMPLE_STRNCASECHR_INV 3 2018-11-25 libsimple
+.SH NAME
+libsimple_strncasechr_inv \- find a different character in a string
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+char *libsimple_strncasechr_inv(const char *\fIs\fP, int \fIc\fP, size_t \fIn\fP);
+
+#ifndef strncasechr_inv
+# define strncasechr_inv libsimple_strncasechr_inv
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+.SH DESCRIPTION
+The
+.BR libsimple_strncasechr_inv ()
+function scans the string
+.IR s ,
+truncated to
+.I n
+bytes unless it is shorter,
+for the first occurence of any character
+other than
+.I c
+(it is converted to a
+.BR char ).
+If no such character exist in the string,
+the string's end is returned.
+.PP
+The comparison is case-insensitive.
+.SH RETURN VALUE
+The
+.BR libsimple_strncasechr_inv ()
+function returns the pointer
+.I s
+with a minimal offset such that
+.IR tolower(*r)!=tolower(c) ,
+where
+.I r
+is the returned pointer, if no such
+offset less than
+.I n
+exists, it returns
+.BR NULL .
+.SH ERRORS
+The
+.BR libsimple_strncasechr_inv ()
+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_strncasechr_inv ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_strncasechr_inv ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_strncasechr_inv ()
+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_strncasechr (3),
+.BR libsimple_strncasechrnul_inv (3),
+.BR libsimple_strrncasechr_inv (3),
+.BR libsimple_strnchr_inv (3),
+.BR libsimple_strcasechr_inv (3),
+.BR libsimple_memcasechr_inv (3)
diff --git a/man3/libsimple_strnchr.3 b/man3/libsimple_strnchr.3
index 2af62c3..bdb2787 100644
--- a/man3/libsimple_strnchr.3
+++ b/man3/libsimple_strnchr.3
@@ -79,8 +79,9 @@ None.
.SH BUGS
None.
.SH SEE ALSO
+.BR libsimple_strnchr_inv (3),
.BR libsimple_strnchrnul (3),
.BR libsimple_strncasechr (3),
-.BR libsimple_strrnchr (3)
+.BR libsimple_strrnchr (3),
.BR strchr (3),
-.BR memchr (3),
+.BR memchr (3)
diff --git a/man3/libsimple_strnchr_inv.3 b/man3/libsimple_strnchr_inv.3
new file mode 100644
index 0000000..594021f
--- /dev/null
+++ b/man3/libsimple_strnchr_inv.3
@@ -0,0 +1,88 @@
+.TH LIBSIMPLE_STRNCHR_INV 3 2018-11-25 libsimple
+.SH NAME
+libsimple_strnchr_inv \- find a different character in a string
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+char *libsimple_strnchr_inv(const char *\fIs\fP, int \fIc\fP, size_t \fIn\fP);
+
+#ifndef strnchr_inv
+# define strnchr_inv libsimple_strnchr_inv
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+.SH DESCRIPTION
+The
+.BR libsimple_strnchr_inv ()
+function scans the string
+.IR s ,
+truncated to
+.I n
+bytes unless it is shorter,
+for the first occurence of any character
+other than
+.I c
+(it is converted to a
+.BR char ).
+If no such character exist in the string,
+the string's end is returned.
+.PP
+The comparison is case-sensitive.
+.SH RETURN VALUE
+The
+.BR libsimple_strnchr_inv ()
+function returns the pointer
+.I s
+with a minimal offset such that
+.IR *r!=c ,
+where
+.I r
+is the returned pointer, if no such
+offset less than
+.I n
+exists, it returns
+.BR NULL .
+.SH ERRORS
+The
+.BR libsimple_strnchr_inv ()
+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_strnchr_inv ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_strnchr_inv ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_strnchr_inv ()
+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_strnchr (3),
+.BR libsimple_strnchrnul_inv (3),
+.BR libsimple_strncasechr_inv (3),
+.BR libsimple_strrnchr_inv (3),
+.BR libsimple_strchr_inv (3),
+.BR libsimple_memchr_inv (3)
diff --git a/man3/libsimple_strrcasechr.3 b/man3/libsimple_strrcasechr.3
index 34475b6..62ff883 100644
--- a/man3/libsimple_strrcasechr.3
+++ b/man3/libsimple_strrcasechr.3
@@ -74,6 +74,7 @@ None.
.SH BUGS
None.
.SH SEE ALSO
+.BR libsimple_strrcasechr_inv (3),
.BR libsimple_strcasechr (3),
.BR libsimple_strrncasechr (3),
.BR libsimple_memrcasechr (3),
diff --git a/man3/libsimple_strrcasechr_inv.3 b/man3/libsimple_strrcasechr_inv.3
new file mode 100644
index 0000000..66f9df4
--- /dev/null
+++ b/man3/libsimple_strrcasechr_inv.3
@@ -0,0 +1,82 @@
+.TH LIBSIMPLE_STRRCASECHR_INV 3 2018-11-25 libsimple
+.SH NAME
+libsimple_strrcasechr_inv \- find a different character in a string
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+char *libsimple_strrcasechr_inv(const char *\fIs\fP, int \fIc\fP);
+
+#ifndef strrcasechr_inv
+# define strrcasechr_inv libsimple_strrcasechr_inv
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+.SH DESCRIPTION
+The
+.BR libsimple_strrcasechr_inv ()
+function scans the string
+.I s
+for the last occurence of any character
+other than
+.I c
+(it is converted to a
+.BR char ).
+If no such character exist in the string,
+the string's end is returned.
+.PP
+The comparison is case-insensitive.
+.SH RETURN VALUE
+The
+.BR libsimple_strrcasechr_inv ()
+function returns the pointer
+.I s
+with a maximal offset such that
+.IR tolower(*r)!=tolower(c) ,
+where
+.I r
+is the returned pointer, if no such
+offset exists, it returns
+.BR NULL .
+.SH ERRORS
+The
+.BR libsimple_strrcasechr_inv ()
+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_strrcasechr_inv ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_strrcasechr_inv ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_strrcasechr_inv ()
+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_strrcasechr (3),
+.BR libsimple_strrchr_inv (3),
+.BR libsimple_strcasechr_inv (3),
+.BR libsimple_strrncasechr_inv (3),
+.BR libsimple_memrcasechr_inv (3)
diff --git a/man3/libsimple_strrchr_inv.3 b/man3/libsimple_strrchr_inv.3
new file mode 100644
index 0000000..71059fa
--- /dev/null
+++ b/man3/libsimple_strrchr_inv.3
@@ -0,0 +1,82 @@
+.TH LIBSIMPLE_STRRCHR_INV 3 2018-11-25 libsimple
+.SH NAME
+libsimple_strrchr_inv \- find a different character in a string
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+char *libsimple_strrchr_inv(const char *\fIs\fP, int \fIc\fP);
+
+#ifndef strrchr_inv
+# define strrchr_inv libsimple_strrchr_inv
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+.SH DESCRIPTION
+The
+.BR libsimple_strrchr_inv ()
+function scans the string
+.I s
+for the last occurence of any character
+other than
+.I c
+(it is converted to a
+.BR char ).
+If no such character exist in the string,
+the string's end is returned.
+.PP
+The comparison is case-sensitive.
+.SH RETURN VALUE
+The
+.BR libsimple_strrchr_inv ()
+function returns the pointer
+.I s
+with a maximal offset such that
+.IR *r!=c ,
+where
+.I r
+is the returned pointer, if no such
+offset exists, it returns
+.BR NULL .
+.SH ERRORS
+The
+.BR libsimple_strrchr_inv ()
+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_strrchr_inv ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_strrchr_inv ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_strrchr_inv ()
+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_strrchr (3),
+.BR libsimple_strrcasechr_inv (3),
+.BR libsimple_strchr_inv (3),
+.BR libsimple_strrnchr_inv (3),
+.BR libsimple_memrchr_inv (3)
diff --git a/man3/libsimple_strrncasechr.3 b/man3/libsimple_strrncasechr.3
index 9d70548..7e3ae4e 100644
--- a/man3/libsimple_strrncasechr.3
+++ b/man3/libsimple_strrncasechr.3
@@ -79,6 +79,7 @@ None.
.SH BUGS
None.
.SH SEE ALSO
+.BR libsimple_strrncasechr_inv (3),
.BR libsimple_strncasechr (3),
.BR libsimple_strrnchr (3),
.BR libsimple_strrcasechr (3),
diff --git a/man3/libsimple_strrncasechr_inv.3 b/man3/libsimple_strrncasechr_inv.3
new file mode 100644
index 0000000..40426d6
--- /dev/null
+++ b/man3/libsimple_strrncasechr_inv.3
@@ -0,0 +1,87 @@
+.TH LIBSIMPLE_STRRNCASECHR_INV 3 2018-11-25 libsimple
+.SH NAME
+libsimple_strrncasechr_inv \- find a different character in a string
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+char *libsimple_strrncasechr_inv(const char *\fIs\fP, int \fIc\fP, size_t \fIn\fP);
+
+#ifndef strrncasechr_inv
+# define strrncasechr_inv libsimple_strrncasechr_inv
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+.SH DESCRIPTION
+The
+.BR libsimple_strrncasechr_inv ()
+function scans the string
+.IR s ,
+truncated to
+.I n
+bytes unless it is shorter,
+for the last occurence of any character
+other than
+.I c
+(it is converted to a
+.BR char ).
+If no such character exist in the string,
+the string's end is returned.
+.PP
+The comparison is case-insensitive.
+.SH RETURN VALUE
+The
+.BR libsimple_strrncasechr_inv ()
+function returns the pointer
+.I s
+with a maximal offset such that
+.IR tolower(*r)!=tolower(c) ,
+where
+.I r
+is the returned pointer, if no such
+offset less than
+.I n
+exists, it returns
+.BR NULL .
+.SH ERRORS
+The
+.BR libsimple_strrncasechr_inv ()
+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_strrncasechr_inv ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_strrncasechr_inv ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_strrncasechr_inv ()
+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_strrncasechr (3),
+.BR libsimple_strncasechr_inv (3),
+.BR libsimple_strrnchr_inv (3),
+.BR libsimple_strrcasechr_inv (3),
+.BR libsimple_memrcasechr_inv (3)
diff --git a/man3/libsimple_strrnchr.3 b/man3/libsimple_strrnchr.3
index f01025d..a677bfe 100644
--- a/man3/libsimple_strrnchr.3
+++ b/man3/libsimple_strrnchr.3
@@ -79,7 +79,8 @@ None.
.SH BUGS
None.
.SH SEE ALSO
+.BR libsimple_strrnchr_inv (3),
.BR libsimple_strrncasechr (3),
.BR libsimple_strnchr (3),
-.BR libsimple_strrchr (3),
-.BR libsimple_memrchr (3)
+.BR libsimple_memrchr (3),
+.BR strrchr (3)
diff --git a/man3/libsimple_strrnchr_inv.3 b/man3/libsimple_strrnchr_inv.3
new file mode 100644
index 0000000..3cfdac9
--- /dev/null
+++ b/man3/libsimple_strrnchr_inv.3
@@ -0,0 +1,87 @@
+.TH LIBSIMPLE_STRRNCHR_INV 3 2018-11-25 libsimple
+.SH NAME
+libsimple_strrnchr_inv \- find a different character in a string
+.SH SYNOPSIS
+.nf
+#include <libsimple.h>
+
+char *libsimple_strrnchr_inv(const char *\fIs\fP, int \fIc\fP, size_t \fIn\fP);
+
+#ifndef strrnchr_inv
+# define strrnchr_inv libsimple_strrnchr_inv
+#endif
+.fi
+.PP
+Link with
+.IR \-lsimple .
+.SH DESCRIPTION
+The
+.BR libsimple_strrnchr_inv ()
+function scans the string
+.IR s ,
+truncated to
+.I n
+bytes unless it is shorter,
+for the last occurence of any character
+other than
+.I c
+(it is converted to a
+.BR char ).
+If no such character exist in the string,
+the string's end is returned.
+.PP
+The comparison is case-sensitive.
+.SH RETURN VALUE
+The
+.BR libsimple_strrnchr_inv ()
+function returns the pointer
+.I s
+with a maximal offset such that
+.IR *r!=c ,
+where
+.I r
+is the returned pointer, if no such
+offset less than
+.I n
+exists, it returns
+.BR NULL .
+.SH ERRORS
+The
+.BR libsimple_strrnchr_inv ()
+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_strrnchr_inv ()
+T} Thread safety MT-Safe
+T{
+.BR libsimple_strrnchr_inv ()
+T} Async-signal safety AS-Safe
+T{
+.BR libsimple_strrnchr_inv ()
+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_strrnchr (3),
+.BR libsimple_strrncasechr_inv (3),
+.BR libsimple_strnchr_inv (3),
+.BR libsimple_strrchr_inv (3),
+.BR libsimple_memrchr_inv (3)
diff --git a/memchr_inv.c b/memchr_inv.c
index 45885fb..2eed2e0 100644
--- a/memchr_inv.c
+++ b/memchr_inv.c
@@ -4,7 +4,7 @@
void *
-libsimple_memchr_inv(const void *s_, int c_, size_t n) /* TODO man */
+libsimple_memchr_inv(const void *s_, int c_, size_t n)
{
char *s = *(char **)(void *)&s_, c = (char)c_;
size_t i = 0;
diff --git a/rawmemelem.c b/rawmemelem.c
index 92beedb..d2d743a 100644
--- a/rawmemelem.c
+++ b/rawmemelem.c
@@ -4,7 +4,7 @@
void *
-libsimple_rawmemelem(const void *hay_, const void *sub_, size_t subn) /* TODO man */
+libsimple_rawmemelem(const void *hay_, const void *sub_, size_t subn)
{
switch (subn) {
case 0:
diff --git a/rawmemelem_inv.c b/rawmemelem_inv.c
index 88fcc6d..0946a48 100644
--- a/rawmemelem_inv.c
+++ b/rawmemelem_inv.c
@@ -4,7 +4,7 @@
void *
-libsimple_rawmemelem_inv(const void *hay_, const void *sub_, size_t subn) /* TODO man */
+libsimple_rawmemelem_inv(const void *hay_, const void *sub_, size_t subn)
{
switch (subn) {
case 0:
diff --git a/rawmemrelem.c b/rawmemrelem.c
index 4e93b5c..078aa05 100644
--- a/rawmemrelem.c
+++ b/rawmemrelem.c
@@ -4,7 +4,7 @@
void *
-libsimple_rawmemrelem(const void *hay_, size_t hayn, const void *sub_, size_t subn) /* TODO man */
+libsimple_rawmemrelem(const void *hay_, size_t hayn, const void *sub_, size_t subn)
{
switch (subn) {
case 0:
diff --git a/rawmemrelem_inv.c b/rawmemrelem_inv.c
index c4141e5..6c16697 100644
--- a/rawmemrelem_inv.c
+++ b/rawmemrelem_inv.c
@@ -4,7 +4,7 @@
void *
-libsimple_rawmemrelem_inv(const void *hay_, size_t hayn, const void *sub_, size_t subn) /* TODO man */
+libsimple_rawmemrelem_inv(const void *hay_, size_t hayn, const void *sub_, size_t subn)
{
switch (subn) {
case 0:
diff --git a/strcasechr_inv.c b/strcasechr_inv.c
index c5ff521..03e88c7 100644
--- a/strcasechr_inv.c
+++ b/strcasechr_inv.c
@@ -4,7 +4,7 @@
char *
-libsimple_strcasechr_inv(const char *s_, int c) /* TODO man */
+libsimple_strcasechr_inv(const char *s_, int c)
{
char *s = *(char **)(void *)&s_, lc = (char)tolower(c), uc = (char)toupper(c);
if (lc != uc)
diff --git a/strchr_inv.c b/strchr_inv.c
index d9fecf6..4c1e242 100644
--- a/strchr_inv.c
+++ b/strchr_inv.c
@@ -4,7 +4,7 @@
char *
-libsimple_strchr_inv(const char *s_, int c_) /* TODO man */
+libsimple_strchr_inv(const char *s_, int c_)
{
char *s = *(char **)(void *)&s_, c = (char)c_;
for (; *s && *s == c; s++);
diff --git a/strncasechr_inv.c b/strncasechr_inv.c
index e6c0581..cd30867 100644
--- a/strncasechr_inv.c
+++ b/strncasechr_inv.c
@@ -4,7 +4,7 @@
char *
-libsimple_strncasechr_inv(const char *s_, int c, size_t n) /* TODO man */
+libsimple_strncasechr_inv(const char *s_, int c, size_t n)
{
char *s = *(char **)(void *)&s_;
char *end = &s[n];
diff --git a/strnchr_inv.c b/strnchr_inv.c
index 3dd3c43..7854d13 100644
--- a/strnchr_inv.c
+++ b/strnchr_inv.c
@@ -4,7 +4,7 @@
char *
-libsimple_strnchr_inv(const char *s_, int c_, size_t n) /* TODO man */
+libsimple_strnchr_inv(const char *s_, int c_, size_t n)
{
char *s = *(char **)(void *)&s_, c = (char)c_;
char *end = &s[n];
diff --git a/strrcasechr_inv.c b/strrcasechr_inv.c
index 66a3837..5572a38 100644
--- a/strrcasechr_inv.c
+++ b/strrcasechr_inv.c
@@ -4,7 +4,7 @@
char *
-libsimple_strrcasechr_inv(const char *s_, int c) /* TODO man */
+libsimple_strrcasechr_inv(const char *s_, int c)
{
char *s = *(char **)(void *)&s_, lc = (char)tolower(c), uc = (char)toupper(c), *r = NULL;
if (lc != uc) {
diff --git a/strrchr_inv.c b/strrchr_inv.c
index 3fdd1dc..37b7e79 100644
--- a/strrchr_inv.c
+++ b/strrchr_inv.c
@@ -4,7 +4,7 @@
char *
-libsimple_strrchr_inv(const char *s_, int c_) /* TODO man */
+libsimple_strrchr_inv(const char *s_, int c_)
{
char *s = *(char **)(void *)&s_, c = (char)c_, *r = NULL;
for (; *s; s++)
diff --git a/strrncasechr_inv.c b/strrncasechr_inv.c
index 62a20f1..eb68b49 100644
--- a/strrncasechr_inv.c
+++ b/strrncasechr_inv.c
@@ -4,7 +4,7 @@
char *
-libsimple_strrncasechr_inv(const char *s_, int c, size_t n) /* TODO man */
+libsimple_strrncasechr_inv(const char *s_, int c, size_t n)
{
char *s = *(char **)(void *)&s_;
char *end = &s[n], *r = NULL;
diff --git a/strrnchr_inv.c b/strrnchr_inv.c
index 80be865..fe657f9 100644
--- a/strrnchr_inv.c
+++ b/strrnchr_inv.c
@@ -4,7 +4,7 @@
char *
-libsimple_strrnchr_inv(const char *s_, int c_, size_t n) /* TODO man */
+libsimple_strrnchr_inv(const char *s_, int c_, size_t n)
{
char *s = *(char **)(void *)&s_, c = (char)c_;
char *end = &s[n], *r = NULL;