Libft
 
Loading...
Searching...
No Matches
Print functions

Print functions. More...

Functions

ssize_t ft_putchar_fd (const char c, int fd)
 Print the character 'c' on the file descriptor.
 
ssize_t ft_putstr_fd (const char *s, int fd)
 Print the string 's' on the file descriptor.
 
ssize_t ft_putnstr_fd (const char *s, size_t len, int fd)
 Print the string 's' on the file descriptor until a given size or the length of s if len is greater.
 
ssize_t ft_putendl_fd (const char *s, int fd)
 Print the string 's' on the file descriptor, followed by a newline.
 
ssize_t ft_putnendl_fd (const char *s, size_t len, int fd)
 Print the string 's' on the file descriptor, followed by a newline until a given size or the length of s if len is greater.
 
ssize_t ft_putnbr_fd (long long n, int fd)
 Write the int 'n' on the given file descriptor.
 
ssize_t ft_putnbr_bin (int nbr)
 Putnbr for binary.
 
ssize_t ft_putnbr_oct (int nbr)
 Putnbr for octal.
 
ssize_t ft_putnbr_hex (int nbr, char height)
 Putnbr for hex or HEX.
 
ssize_t ft_putnbr_hex_fd (unsigned int nbr, char height, int fd)
 Putnbr for hex or HEX.
 
ssize_t ft_putptr_fd (unsigned long nbr, int fd)
 Print pointer adress.
 
ssize_t ft_putnbr_base (int nbr, const char *base)
 Putnbr with a particular base.
 
size_t ft_check_base_atoi (const char *base)
 Check if base is valid for atoi_base.
 
size_t ft_check_base_putnbr (const char *base)
 Check if base is valid for putnbr_base.
 
ssize_t ft_putpointer_fd (const void *ptr)
 Print pointer adress.
 

Detailed Description

Print functions.

Function Documentation

◆ ft_check_base_atoi()

size_t ft_check_base_atoi ( const char * base)

Check if base is valid for atoi_base.

Parameters
basebase to check
Returns
int 1 if valid, 0 if not
Here is the call graph for this function:

◆ ft_check_base_putnbr()

size_t ft_check_base_putnbr ( const char * base)

Check if base is valid for putnbr_base.

Parameters
basebase to check
Returns
int 1 if valid, 0 if not
Here is the call graph for this function:

◆ ft_putchar_fd()

ssize_t ft_putchar_fd ( const char c,
int fd )

Print the character 'c' on the file descriptor.

Parameters
ccharacter to print
fdfile descriptor
Returns
ssize_t number of char printed

◆ ft_putendl_fd()

ssize_t ft_putendl_fd ( const char * s,
int fd )

Print the string 's' on the file descriptor, followed by a newline.

Parameters
sstring to print
fdfile descriptor
Returns
ssize_t number of char printed
Here is the call graph for this function:

◆ ft_putnbr_base()

ssize_t ft_putnbr_base ( int nbr,
const char * base )

Putnbr with a particular base.

Parameters
nbrnumber to print
basebase to use
Returns
ssize_t number of char printed
Here is the call graph for this function:

◆ ft_putnbr_bin()

ssize_t ft_putnbr_bin ( int nbr)

Putnbr for binary.

Parameters
nbrnumber to print
Here is the call graph for this function:

◆ ft_putnbr_fd()

ssize_t ft_putnbr_fd ( long long n,
int fd )

Write the int 'n' on the given file descriptor.

Parameters
nnumber to print
fdfile descriptor
Returns
ssize_t number of char printed

◆ ft_putnbr_hex()

ssize_t ft_putnbr_hex ( int nbr,
char height )

Putnbr for hex or HEX.

Parameters
nbrnumber to print
height1 for hex, 0 for HEX
Here is the call graph for this function:

◆ ft_putnbr_hex_fd()

ssize_t ft_putnbr_hex_fd ( unsigned int nbr,
char height,
int fd )

Putnbr for hex or HEX.

Parameters
nbrnumber to print
height1 for hex, 0 for HEX
fdfile descriptor
Returns
ssize_t number of char printed

◆ ft_putnbr_oct()

ssize_t ft_putnbr_oct ( int nbr)

Putnbr for octal.

Parameters
nbrnumber to print
Here is the call graph for this function:

◆ ft_putnendl_fd()

ssize_t ft_putnendl_fd ( const char * s,
size_t len,
int fd )

Print the string 's' on the file descriptor, followed by a newline until a given size or the length of s if len is greater.

Parameters
sstring to print
lenmaximum char to be printed
fdfile descriptor
Returns
ssize_t nombre de caractere qui ont été écrits
Here is the call graph for this function:

◆ ft_putnstr_fd()

ssize_t ft_putnstr_fd ( const char * s,
size_t len,
int fd )

Print the string 's' on the file descriptor until a given size or the length of s if len is greater.

Parameters
sstring to print
lenmaximum char to be printed
fdnombre de caractere qui ont été écrits
Returns
ssize_t nombre de caractere qui ont été écrits
Here is the call graph for this function:

◆ ft_putpointer_fd()

ssize_t ft_putpointer_fd ( const void * ptr)

Print pointer adress.

Parameters
ptrpointer to print
Returns
ssize_t number of char printed
Here is the call graph for this function:

◆ ft_putptr_fd()

ssize_t ft_putptr_fd ( unsigned long nbr,
int fd )

Print pointer adress.

Parameters
nbrNumber to be printed
fdFile descriptor
Returns
ssize_t number of char printed

◆ ft_putstr_fd()

ssize_t ft_putstr_fd ( const char * s,
int fd )

Print the string 's' on the file descriptor.

Parameters
sstring to print
fdfile descriptor
Returns
ssize_t nombre de caractere qui ont été écrits
Here is the call graph for this function: