1
0
libft_new/print/printf/ft_putstr.c

27 lines
1.0 KiB
C
Raw Normal View History

2023-11-03 16:21:15 +01:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
2024-02-04 15:11:02 +01:00
/* ft_putstr.c :+: :+: :+: */
2023-11-03 16:21:15 +01:00
/* +:+ +:+ +:+ */
2024-02-04 15:26:48 +01:00
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
2023-11-03 16:21:15 +01:00
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/31 11:45:55 by adjoly #+# #+# */
2024-02-04 15:26:48 +01:00
/* Updated: 2024/02/04 15:23:52 by adjoly ### ########.fr */
2023-11-03 16:21:15 +01:00
/* */
/* ************************************************************************** */
2024-02-04 15:11:02 +01:00
#include "ft_printf.h"
2023-11-03 16:21:15 +01:00
2024-02-04 15:26:48 +01:00
int ft_putstr_p(char *s)
2023-11-03 16:21:15 +01:00
{
int i;
i = 0;
2023-11-05 15:12:25 +01:00
if (s == NULL)
2024-02-04 15:11:02 +01:00
{
write(1, "(null)", 6);
return (6);
}
2024-02-04 15:26:48 +01:00
return (write(1, s, ft_strlen(s)));
2023-11-03 16:21:15 +01:00
}