nt

Unnamed repository; edit this file 'description' to name the repository.
git clone git://edryd.org/nt
Log | Files | Refs | LICENSE

commit c12b753082d2517656015ad78fcce9808016e508
parent b96fc55b067ca0e344093673bc8dc36eaeea2508
Author: Ed van Bruggen <edvb54@gmail.com>
Date:   Fri, 18 Aug 2017 16:07:39 -0700

Remove charinstr

Diffstat:
nt.c | 2+-
str.c | 10----------
str.h | 1-
3 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/nt.c b/nt.c @@ -103,7 +103,7 @@ get_cat(char *str) char *cat = estrdup(str); char delim[2] = { catdelim, 0 }; - if (charinstr(catdelim, str)) + if (strchr(str, catdelim)) strtok(cat, delim); else cat = NULL; diff --git a/str.c b/str.c @@ -62,13 +62,3 @@ strinlist(char *str, char **list, int listc) return 1; return 0; } - -int -charinstr(char c, char *str) -{ - if (!str) return 0; - for (; *str; str++) - if (*str == c) - return 1; - return 0; -} diff --git a/str.h b/str.h @@ -3,4 +3,3 @@ char *strconcat(char **s, int c); char *strtrim(char *s); int strinlist(char *str, char **list, int listc); -int charinstr(char c, char *str);