maxishell
Implementation of a shell for Linux-like systems
Loading...
Searching...
No Matches
ft_print_2d_arr.c
Go to the documentation of this file.
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* ft_print_2d_arr.c :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: rmikhayl <marvin@42.fr> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2024/09/09 19:37:13 by rmikhayl #+# #+# */
9/* Updated: 2024/09/09 19:37:16 by rmikhayl ### ########.fr */
10/* */
11/* ************************************************************************** */
12
13#include "libft.h"
14
15void ft_print_2d_arr(char **arr, char *name)
16{
17 int i;
18
19 i = 0;
20 if (ft_strlen(name) > 0)
21 ft_printf(GRN"----- %s[] -----\n"RESET, name);
22 while (arr && arr[i])
23 {
24 ft_printf(GRN"arr[%d]: %s at add: %p \n"RESET, \
25 i, arr[i], arr[i]);
26 i++;
27 }
28}
void ft_print_2d_arr(char **arr, char *name)
int ft_printf(const char *format,...)
Definition ft_printf.c:37
#define RESET
Definition libft.h:111
size_t ft_strlen(const char *s)
Definition ft_strlen.c:15
#define GRN
Definition libft.h:115