Exemplo n.º 1
0
unsigned long EventNumberContainer::sumAll_infections(){

	unsigned long N = _event_label.size();
	unsigned long res = 0;
	
	for(int i=0; i<N; i++)
		if(is_in_string(_event_label[i], "infection")) res += _n_event[i];
	
	return(res);
}
Exemplo n.º 2
0
void		ft_inter(char *s1, char *s2)
{
	int i;

	i = 0;
	while (s1[i])
	{
		if (is_in_string(s2, s1[i]) && is_first(s1, s1[i], i))
			write(1, &s1[i], 1);
		i++;
	}
}
Exemplo n.º 3
0
Arquivo: inter.c Projeto: Balkhagal/42
void	inter(char *str, char *str2)
{
	int i;

	i= 0;
	while (str[i])
	{
		if (is_in_string(str2, str[i]) && first_time(str, str[i], i))
			write(1, &str[i], 1);
		i++;
	}
}