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
15
int
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
}
ft_print_str
int ft_print_str(char *str)
Definition
ft_print_str.c:15
libft.h
ft_putchar_fd
void ft_putchar_fd(char c, int fd)
Definition
ft_putchar_fd.c:20
ft_putstr_fd
void ft_putstr_fd(char *s, int fd)
Definition
ft_putstr_fd.c:20
lib
libft
src
ft_print_str.c
Generated by
1.9.8