diff options
author | Mattias Andrée <maandree@kth.se> | 2018-08-12 22:02:07 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2018-08-12 22:04:32 +0200 |
commit | 1054a875c7f96e5799c8bfbf8a73e41dd064b606 (patch) | |
tree | 48184e8d2f0c15bae01aee97eaf57247c34e968a /README | |
parent | Add tests (diff) | |
download | libsimple-1054a875c7f96e5799c8bfbf8a73e41dd064b606.tar.gz libsimple-1054a875c7f96e5799c8bfbf8a73e41dd064b606.tar.bz2 libsimple-1054a875c7f96e5799c8bfbf8a73e41dd064b606.tar.xz |
Add memrmem, strrstr, and strrcasestr
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | README | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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) |