0
0

Add all git folders

This commit is contained in:
Baco
2021-08-15 23:30:40 +02:00
parent 0abd1f86bc
commit a808b91a50
123 changed files with 2391 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strstr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gbaconni <marvin@42lausanne.ch> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/08/12 16:49:31 by gbaconni #+# #+# */
/* Updated: 2021/08/12 17:11:14 by gbaconni ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdlib.h>
char *ft_strstr(char *str, char *to_find)
{
unsigned int i;
unsigned int j;
i = 0;
while (str[i] != '\0')
{
j = 0;
while (str[i + j] != '\0' && str[i + j] == to_find[j])
j++;
if (to_find[j] == '\0')
return (str + i);
i++;
}
return (NULL);
}