removed printf

This commit is contained in:
Tanguy MAZE 2018-10-08 15:21:57 +02:00
parent 81a748516d
commit be305ae381

View File

@ -6,11 +6,10 @@
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */ /* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2018/05/16 11:41:02 by tmaze #+# #+# */ /* Created: 2018/05/16 11:41:02 by tmaze #+# #+# */
/* Updated: 2018/05/16 11:56:15 by tmaze ### ########.fr */ /* Updated: 2018/10/08 15:21:15 by tmaze ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include <stdio.h>
#include "libft.h" #include "libft.h"
char *ft_strnchr(const char *s, int c, int n) char *ft_strnchr(const char *s, int c, int n)
@ -21,10 +20,7 @@ char *ft_strnchr(const char *s, int c, int n)
i = -1; i = -1;
tmp = (char*)s; tmp = (char*)s;
while ((++i == 0 || tmp[i - 1]) && n > 0 && i < n) while ((++i == 0 || tmp[i - 1]) && n > 0 && i < n)
{
printf("loop %d\nc: %c\ntmp[i]: %c\n", i, c, tmp[i]);
if (tmp[i] == c) if (tmp[i] == c)
return (&tmp[i]); return (&tmp[i]);
}
return (NULL); return (NULL);
} }