diff options
| author | Cabergs Charles <cacharle@e-r6-p7.s19.be> | 2019-07-07 15:29:30 +0200 |
|---|---|---|
| committer | Cabergs Charles <cacharle@e-r6-p7.s19.be> | 2019-07-07 15:29:30 +0200 |
| commit | 1fd0ebe76b81187fa428b4d699fb70cd4407fef5 (patch) | |
| tree | 32827b5be808bf3123d46856bb753fc190fd3611 /c03/ex04 | |
| parent | 8d88f6751542e7654025dc60d6886c7b26f6993b (diff) | |
| download | piscine-1fd0ebe76b81187fa428b4d699fb70cd4407fef5.tar.gz piscine-1fd0ebe76b81187fa428b4d699fb70cd4407fef5.tar.bz2 piscine-1fd0ebe76b81187fa428b4d699fb70cd4407fef5.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)) |
