libcli/cldap: make use of samba_tevent_context_init()
[Samba/gebeck_regimport.git] / lib / ccan / str / str.c
blobfa9809fbd94d3670ac6190697f253f9c208b4342
1 #include <ccan/str/str.h>
3 size_t strcount(const char *haystack, const char *needle)
5 size_t i = 0, nlen = strlen(needle);
7 while ((haystack = strstr(haystack, needle)) != NULL) {
8 i++;
9 haystack += nlen;
11 return i;