diff options
author | Mattias Andrée <maandree@kth.se> | 2018-08-19 13:23:21 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2018-08-19 13:23:21 +0200 |
commit | a405c151df74d4d3b4d06c38feff6458bef375a9 (patch) | |
tree | 7a06fe944e440134ab278623b909e73e9f83d3a7 /strchrnul.c | |
parent | Add str[r]n[case]str and str[n][case]cmpnul (diff) | |
download | libsimple-a405c151df74d4d3b4d06c38feff6458bef375a9.tar.gz libsimple-a405c151df74d4d3b4d06c38feff6458bef375a9.tar.bz2 libsimple-a405c151df74d4d3b4d06c38feff6458bef375a9.tar.xz |
Add str[n]caseeq[null] and some tests
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'strchrnul.c')
-rw-r--r-- | strchrnul.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/strchrnul.c b/strchrnul.c index 2dccb7a..77634c0 100644 --- a/strchrnul.c +++ b/strchrnul.c @@ -18,9 +18,9 @@ libsimple_strchrnul(const char *s_, int c) int main(void) { - assert(!strcmp(libsimple_strchrnul("1234512345", '3'), "34512345")); - assert(!strcmp(libsimple_strchrnul("1234512345", '1'), "1234512345")); - assert(!strcmp(libsimple_strchrnul("1234512345", 'x'), "")); + assert(!strcmpnul(libsimple_strchrnul("1234512345", '3'), "34512345")); + assert(!strcmpnul(libsimple_strchrnul("1234512345", '1'), "1234512345")); + assert(!strcmpnul(libsimple_strchrnul("1234512345", 'x'), "")); return 0; } |