preotection trim et split
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: hulamy <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2019/11/25 14:01:40 by hulamy #+# #+# */
|
||||
/* Updated: 2019/12/04 17:01:25 by hulamy ### ########.fr */
|
||||
/* Updated: 2019/12/09 21:44:07 by hulamy ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -47,8 +47,8 @@
|
||||
** str = strdup(av[1]);
|
||||
** if (ac == 1)
|
||||
** str = NULL;
|
||||
** printf("%s\n",str);
|
||||
** str = ft_strmapi(str, touppercase);
|
||||
** //str = ft_strmapi(str, touppercase);
|
||||
** str = ft_strmapi(str, NULL);
|
||||
** printf("%s\n",str);
|
||||
** return (0);
|
||||
** }
|
||||
@@ -62,7 +62,7 @@ char *ft_strmapi(char const *s, char (*f)(unsigned int, char))
|
||||
int i;
|
||||
int size;
|
||||
|
||||
if (!s)
|
||||
if (!s || !f)
|
||||
return (NULL);
|
||||
size = ft_strlen(s);
|
||||
if (!(str = (char *)malloc(sizeof(char) * (size + 1))))
|
||||
|
||||
Reference in New Issue
Block a user