From 73c2b00a10c5786ddeeacc915e233fd4df1c9321 Mon Sep 17 00:00:00 2001 From: Martial Simon Date: Sat, 11 Oct 2025 22:19:00 +0200 Subject: fix: evalexpr & tinyprintf contenaient toute la piscine --- rushs/tinyprintf/my_strstr/my_strstr.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 rushs/tinyprintf/my_strstr/my_strstr.c (limited to 'rushs/tinyprintf/my_strstr/my_strstr.c') diff --git a/rushs/tinyprintf/my_strstr/my_strstr.c b/rushs/tinyprintf/my_strstr/my_strstr.c deleted file mode 100644 index 36ac439..0000000 --- a/rushs/tinyprintf/my_strstr/my_strstr.c +++ /dev/null @@ -1,34 +0,0 @@ -#include "my_strstr.h" - -#include - -int my_strstr(const char *haystack, const char *needle) -{ - if (needle == NULL || *needle == '\0') - { - return 0; - } - - for (int i = 0; haystack[i]; i++) - { - if (haystack[i] == needle[0]) - { - int j; - for (j = 0; - haystack[i + j] && needle[j] && needle[j] == haystack[i + j]; - j++) - { - continue; - } - if (needle[j] == '\0') - { - return i; - } - if (haystack[i + j] == '\0') - { - return -1; - } - } - } - return -1; -} -- cgit v1.2.3