C and C++ web framework. http://rapida.vilor.one/docs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
285 B

/* SPDX-License-Identifier: GPL-3.0-or-later */
/* Copyright 2022 Ivan Polyakov */
#include "utils.h"
int count_char_entries(const char *str, char ch)
{
int cnt = 0;
while (*str) {
if (*str == ch) {
cnt++;
}
str++;
}
return cnt;
}