diff options
| author | Dominik Kaiser | 2024-03-22 16:52:19 +0100 |
|---|---|---|
| committer | Dominik Kaiser | 2024-03-22 16:52:19 +0100 |
| commit | c9e8005df3f0f3f68f58626420960519b078f5a4 (patch) | |
| tree | f4355e5a1aef18751252d770e1821285ffa6de41 /get_next_line_utils.c | |
| parent | 149353e6b0895ae02ae05ee2635519a811b0f46d (diff) | |
| download | get_next_line-c9e8005df3f0f3f68f58626420960519b078f5a4.tar.gz get_next_line-c9e8005df3f0f3f68f58626420960519b078f5a4.zip | |
It is working (or is it?)
If '\n' is the last character in the buffer it won't work.
Other than that everything is working fine (as far as my current tests go...)
Diffstat (limited to 'get_next_line_utils.c')
| -rw-r--r-- | get_next_line_utils.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/get_next_line_utils.c b/get_next_line_utils.c index d6fc37a..6127736 100644 --- a/get_next_line_utils.c +++ b/get_next_line_utils.c @@ -6,12 +6,22 @@ /* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/03/15 14:14:59 by dkaiser #+# #+# */ -/* Updated: 2024/03/21 15:22:40 by dkaiser ### ########.fr */ +/* Updated: 2024/03/22 12:05:00 by dkaiser ### ########.fr */ /* */ /* ************************************************************************** */ #include "get_next_line.h" +int ft_strlen(const char *str) +{ + int len; + + len = 0; + while (str[len]) + len++; + return (len); +} + char * str_realloc(char *str, size_t size) { char *result; |
