-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_doublestr.c
36 lines (33 loc) · 1.26 KB
/
ft_doublestr.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_doublestr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mbutt <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/03/14 23:27:48 by mbutt #+# #+# */
/* Updated: 2019/03/19 15:59:11 by mbutt ### ########.fr */
/* */
/* ************************************************************************** */
/*
** Description - Creates an array of a string with double pointer.
*/
#include "libft.h"
char **ft_doublestr(char const *s)
{
while (*s)
{
write(1, s++, 1);
}
return (0);
}
/*
**int main (void)
** {
** char *string1[] = {"Testing", "this", "thing", "to", "see"};
** char array[4] = ft_doublestr(string1[4]);
** printf("%s", array[0]);
** ft_doublestr(string1[2]);
** return(0);
**}
*/