Added count function

pull/23/head
parent abb3f087c9
commit 93817dee16

@ -431,6 +431,18 @@ int yon_char_find_count(char *source, char *find){
return i;
}
int yon_char_count(char *source, char *find){
char *working_string=yon_char_new(source);
int i=0;
int size=0;
char *cur=strstr(source,find);
for (i=0;cur;cur = strstr(cur,find)){
cur++;
i++;
}
return i;
}
char *yon_char_divide_search(char *source, char *dividepos, int delete_divider)
{
if (source&&dividepos){

@ -443,6 +443,8 @@ int yon_char_parsed_check_repeats(char **parameters, int size, int *first_overla
*/
int yon_char_find_count(char *source, char *find);
int yon_char_count(char *source, char *find);
/**yon_char_parsed_includes_char_parsed (config_str source, config_str to_check, int source_size, int check_size)
* [EN]
*

Loading…
Cancel
Save