From 1054a875c7f96e5799c8bfbf8a73e41dd064b606 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 12 Aug 2018 22:02:07 +0200 Subject: Add memrmem, strrstr, and strrcasestr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- README | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'README') diff --git a/README b/README index 28dfac8..5310275 100644 --- a/README +++ b/README @@ -123,6 +123,10 @@ The following functions are defined (some as inline functions): Finds the first occurrence of `t` in `s`. Length of `s` is `sn`. Length of `t` is `tn`. + void *libsimple_memrmem(const void *s, size_t sn, const void *t, size_t tn) + Finds the last occurrence of `t` in `s`. + Length of `s` is `sn`. Length of `t` is `tn`. + int libsimple_memstarts(const void *s, size_t sn, const void *t, size_t tn) Returns 1 if `s` starts with `t`, 0 otherwise. Length of `s` is `sn`. Length of `t` is `tn`. @@ -131,6 +135,9 @@ The following functions are defined (some as inline functions): Returns 1 if `s` ends with `t`, 0 otherwise. Length of `s` is `sn`. Length of `t` is `tn`. + char *libsimple_strrstr(const char *s, const char *t) + Finds the last occurrence of `t` in `s`. + int libsimple_strstarts(const char *s, const char *t) Returns 1 if `s` starts with `t`, 0 otherwise. @@ -146,6 +153,9 @@ The following functions are defined (some as inline functions): char *libsimple_strcasestr(const char *, const char *) Like strstr except case-insensitive. + char *libsimple_strrcasestr(const char *, const char *) + Like strrstr except case-insensitive. + int libsimple_streq(const char *a, const char *b) !strncmp(a, b) -- cgit v1.2.3-70-g09d2