maxishell
Implementation of a shell for Linux-like systems
Loading...
Searching...
No Matches
ft_print_str.c
Go to the documentation of this file.
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* ft_print_str.c :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: rocky <rmikhayl@student.42london.com> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2024/01/07 15:47:43 by rocky #+# #+# */
9/* Updated: 2024/01/07 15:47:43 by rocky ### ########.fr */
10/* */
11/* ************************************************************************** */
12
13#include "libft.h"
14
15int ft_print_str(char *str)
16{
17 int len;
18
19 len = 0;
20 if (str == NULL)
21 {
22 ft_putstr_fd("(null)", 1);
23 return (6);
24 }
25 while (*str)
26 {
27 ft_putchar_fd(*str++, 1);
28 len++;
29 }
30 return (len);
31}
int ft_print_str(char *str)
void ft_putchar_fd(char c, int fd)
void ft_putstr_fd(char *s, int fd)