echo builtin
+ WIP grammar rules in parsing.txt + test trop_de_pipes.sh
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2021/10/08 09:25:35 by lperrey #+# #+# */
|
||||
/* Updated: 2021/10/19 19:54:59 by lperrey ### ########.fr */
|
||||
/* Updated: 2021/10/21 18:23:04 by lperrey ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -47,4 +47,28 @@ void ft_lstprint(t_list *lst, int fd)
|
||||
ft_putendl_fd(lst->content, fd);
|
||||
lst = lst->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int ft_isinset_str(char *str, char *set)
|
||||
{
|
||||
size_t i;
|
||||
size_t i_set;
|
||||
int valid;
|
||||
|
||||
i = 0;
|
||||
while (str[i])
|
||||
{
|
||||
valid = 0;
|
||||
i_set = 0;
|
||||
while (set[i_set] && !valid)
|
||||
{
|
||||
if (str[i] == set[i_set])
|
||||
valid = 1;
|
||||
i_set++;
|
||||
}
|
||||
if (!valid)
|
||||
return (0);
|
||||
i++;
|
||||
}
|
||||
return (i);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user