mirror of
https://github.com/Savapitech/42sh.git
synced 2026-03-18 21:50:35 +01:00
23 lines
412 B
C
23 lines
412 B
C
/*
|
|
** EPITECH PROJECT, 2024
|
|
** B-CPE-100-REN-1-1-cpoolday06-savinien.petitjean
|
|
** File description:
|
|
** Task 2
|
|
*/
|
|
|
|
#include <stddef.h>
|
|
|
|
#include "u_str.h"
|
|
|
|
char *u_strstr(char *str, char const *to_find)
|
|
{
|
|
int find_len = u_strlen(to_find);
|
|
|
|
if (*to_find == '\0')
|
|
return str;
|
|
for (; *str != '\0'; str++)
|
|
if (!u_strncmp(str, to_find, find_len))
|
|
return str;
|
|
return NULL;
|
|
}
|