diff options
Diffstat (limited to 'ccan/str/str.c')
| -rw-r--r-- | ccan/str/str.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/ccan/str/str.c b/ccan/str/str.c deleted file mode 100644 index a9245c1..0000000 --- a/ccan/str/str.c +++ /dev/null @@ -1,13 +0,0 @@ -/* CC0 (Public domain) - see LICENSE file for details */ -#include <ccan/str/str.h> - -size_t strcount(const char *haystack, const char *needle) -{ - size_t i = 0, nlen = strlen(needle); - - while ((haystack = strstr(haystack, needle)) != NULL) { - i++; - haystack += nlen; - } - return i; -} |
