Bonus preparartion
This commit is contained in:
24
bonus/print_str_bonus.c
Normal file
24
bonus/print_str_bonus.c
Normal file
@@ -0,0 +1,24 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* print_str.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: dgaillet <dgaillet@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/11/17 12:02:03 by dgaillet #+# #+# */
|
||||
/* Updated: 2025/11/17 12:51:56 by dgaillet ### ########lyon.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
int print_str(char *str)
|
||||
{
|
||||
if (!str)
|
||||
{
|
||||
ft_putstr_fd("(null)", 1);
|
||||
return (6);
|
||||
}
|
||||
ft_putstr_fd(str, 1);
|
||||
return (ft_strlen(str));
|
||||
}
|
||||
Reference in New Issue
Block a user