/
githubmirror
/
ndctl
Обзор
Документация
Войти
/
githubmirror
/
ndctl
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
ccan/str/str.c
13 строк
262 B
Dan Williams
Rework license identification
17 дек 2020, 09:38
17 дек 2020, 09:38
14eacf0
Код
Авторство
О чём код?
// SPDX-License-Identifier: CC0-1.0 #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; }