ft_strcpy.c
This commit is contained in:
parent
6b9b64029f
commit
c6eb75d980
|
@ -6,7 +6,7 @@
|
|||
/* By: tischmid <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/03/19 05:59:56 by tischmid #+# #+# */
|
||||
/* Updated: 2023/03/27 20:56:31 by tischmid ### ########.fr */
|
||||
/* Updated: 2023/03/28 15:09:32 by tischmid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
@ -31,11 +31,13 @@ int main(void)
|
|||
int arrlen = 4;
|
||||
char *teststrings[] = {"", "h", "he", "hey"};
|
||||
char buf[BUFSIZE] = STR;
|
||||
char *return_val;
|
||||
|
||||
for (int j = 0; j < arrlen; ++j)
|
||||
{
|
||||
printf("####### dest = '|' * 10, src == '%s' #######\n", teststrings[j]);
|
||||
ft_strcpy(buf, teststrings[j]);
|
||||
return_val = ft_strcpy(buf, teststrings[j]);
|
||||
printf("RetVal: %s\n", return_val);
|
||||
for (int i = 0; i < BUFSIZE; ++i)
|
||||
printf((buf[i] >= 32 && buf[i] <= 126) ? "%c\n" : "0x%x\n", buf[i]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue