diff options
| author | Charles <sircharlesaze@gmail.com> | 2019-07-07 15:29:30 +0200 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2019-07-07 15:29:30 +0200 |
| commit | a2ef228b981df5ad417a0e8377e1e832002a7644 (patch) | |
| tree | 32827b5be808bf3123d46856bb753fc190fd3611 /c03/ex04 | |
| parent | 79f8ba0b777f3361002ed2ae0c6c6f8f353ca731 (diff) | |
| download | piscine-a2ef228b981df5ad417a0e8377e1e832002a7644.tar.gz piscine-a2ef228b981df5ad417a0e8377e1e832002a7644.tar.bz2 piscine-a2ef228b981df5ad417a0e8377e1e832002a7644.zip | |
c04/c05 testing + c06
Diffstat (limited to 'c03/ex04')
| -rw-r--r-- | c03/ex04/ft_strstr.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/c03/ex04/ft_strstr.c b/c03/ex04/ft_strstr.c index e27ffc8..c8d015e 100644 --- a/c03/ex04/ft_strstr.c +++ b/c03/ex04/ft_strstr.c @@ -6,13 +6,13 @@ /* By: cacharle <charles.cabergs@gmail.com> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/07/05 15:20:54 by cacharle #+# #+# */ -/* Updated: 2019/07/05 16:46:57 by cacharle ### ########.fr */ +/* Updated: 2019/07/06 13:12:55 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ #define MY_NULL 0x0 -int ft_strlen(char *str) +int ft_strlen(char *str) { int counter; @@ -25,19 +25,19 @@ int ft_strlen(char *str) return (counter); } -char *ft_strstr(char *str, char *to_find) +char *ft_strstr(char *str, char *to_find) { int i; if (!ft_strlen(to_find)) - return str; + return (str); while (*str) { i = 0; while (to_find[i] && str[i]) { if (to_find[i] != str[i]) - break; + break ; i++; } if (i == ft_strlen(to_find)) |
