From 67a7c1397ff9d8187ffcfddd34c4cafadc692c92 Mon Sep 17 00:00:00 2001
From: Mattias Andrée <maandree@kth.se>
Date: Sun, 19 Aug 2018 13:32:27 +0200
Subject: Update readme
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Mattias Andrée <maandree@kth.se>
---
 README | 50 +++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 49 insertions(+), 1 deletion(-)

(limited to 'README')

diff --git a/README b/README
index 5310275..1727539 100644
--- a/README
+++ b/README
@@ -138,6 +138,14 @@ The following functions are defined (some as inline functions):
 	char *libsimple_strrstr(const char *s, const char *t)
 		Finds the last occurrence of `t` in `s`.
 
+	char *libsimple_strnstr(const char *s, const char *t, size_t n)
+		Finds the first occurrence of the `n` first characters `t`
+		in `n` first characters `s`.
+
+	char *libsimple_strrnstr(const char *s, const char *t, size_t n)
+		Finds the last occurrence of the `n` first characters `t`
+		in `n` first characters `s`.
+
 	int libsimple_strstarts(const char *s, const char *t)
 		Returns 1 if `s` starts with `t`, 0 otherwise.
 
@@ -156,12 +164,52 @@ The following functions are defined (some as inline functions):
 	char *libsimple_strrcasestr(const char *, const char *)
 		Like strrstr except case-insensitive.
 
+	char *libsimple_strncasestr(const char *, const char *, size_t)
+		Like strnstr except case-insensitive.
+
+	char *libsimple_strrncasestr(const char *, const char *, size_t)
+		Like strrnstr except case-insensitive.
+
+	int libsimple_strcmpnul(const char *a, const char *b)
+		Like strcmp excepts NULL and gives it a value less than
+		the empty string
+
+	int libsimple_strncmpnul(const char *a, const char *b, size_t n)
+		Like strncmp excepts NULL and gives it a value less than
+		the empty string
+
+	int libsimple_strcasecmpnul(const char *a, const char *b)
+		Like strcasecmp excepts NULL and gives it a value less
+		than the empty string
+
+	int libsimple_strncasecmpnul(const char *a, const char *b, size_t n)
+		Like strncasecmp excepts NULL and gives it a value less
+		than the empty string
+
 	int libsimple_streq(const char *a, const char *b)
-		!strncmp(a, b)
+		!strcmp(a, b)
 
 	int libsimple_strneq(const char *a, const char *b, size_t n)
 		!strncmp(a, b, n)
 
+	int libsimple_strcaseeq(const char *a, const char *b)
+		!strcasecmp(a, b)
+
+	int libsimple_strncaseeq(const char *a, const char *b, size_t n)
+		!strncasecmp(a, b, n)
+
+	int libsimple_streqnul(const char *a, const char *b)
+		!strcmpnul(a, b)
+
+	int libsimple_strneqnul(const char *a, const char *b, size_t n)
+		!strncmpnul(a, b, n)
+
+	int libsimple_strcaseeqnul(const char *a, const char *b)
+		!strcasecmpnul(a, b)
+
+	int libsimple_strncaseeqnul(const char *a, const char *b, size_t n)
+		!strncasecmpnul(a, b, n)
+
 	char *getenv_ne(const char *)
 		Like getenv, except returns NULL if the value
 		of the environment variable is the empty string.
-- 
cgit v1.2.3-70-g09d2