strim checked for NULL

This commit is contained in:
Hugo LAMY
2019-12-04 17:08:04 +01:00
parent b53c1a858e
commit 418b9e3af6

View File

@@ -6,7 +6,7 @@
/* By: hulamy <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/11/25 14:01:49 by hulamy #+# #+# */
/* Updated: 2019/11/25 14:20:41 by hulamy ### ########.fr */
/* Updated: 2019/12/04 17:06:50 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
@@ -62,9 +62,20 @@
**
** int main(int ac, char **av)
** {
** if (ac == 3)
** printf("%s\n",ft_strtrim(av[1], av[2]));
** char *s1;
** char *s2;
**
** if (ac == 3)
** {
** s1 = strdup(av[1]);
** s2 = strdup(av[2]);
** }
** if (ac == 1)
** {
** s1 = NULL;
** s2 = NULL;
** }
** printf("%s\n",ft_strtrim(s1, s2));
** return (0);
** }
*/