Skip to content

Commit

Permalink
Add:(vSKAH): ft_str_tab_len
Browse files Browse the repository at this point in the history
  • Loading branch information
vSKAH committed Oct 28, 2023
1 parent d056cd8 commit ad3ab63
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ SRCS = \
ft_lstclear.c \
ft_lstiter.c \
ft_base.c \
ft_str_tab_len.c \
get_next_line.c \
get_next_line_utils.c \
ft_printf/ft_printf.c \
Expand Down
23 changes: 23 additions & 0 deletions ft_str_tab_len.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* fr_tablen.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jbadaire <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/28 02:17:59 by jbadaire #+# #+# */
/* Updated: 2023/10/28 02:17:59 by jbadaire ### ########.fr */
/* */
/* ************************************************************************** */

#include "libft.h"

size_t ft_str_tab_len(char **tab)
{
size_t index;

index = 0;
while (tab[index])
index++;
return (index);
}
1 change: 1 addition & 0 deletions libft.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ int ft_putstr_fd(char *s, int fd);
size_t ft_strlen(const char *s);
size_t ft_strlcat(char *dst, const char *src, size_t size);
size_t ft_strlcpy(char *dst, const char *src, size_t size);
size_t ft_str_tab_len(char **tab);

void *ft_memset(void *s, int c, size_t n);
void *ft_memmove(void *dest, const void *src, size_t n);
Expand Down

0 comments on commit ad3ab63

Please sign in to comment.