2023-02-14 11:11:39 -05:00
|
|
|
/* ************************************************************************** */
|
|
|
|
/* */
|
|
|
|
/* ::: :::::::: */
|
|
|
|
/* utils.h :+: :+: :+: */
|
|
|
|
/* +:+ +:+ +:+ */
|
|
|
|
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
|
|
|
/* +#+#+#+#+#+ +#+ */
|
|
|
|
/* Created: 2023/02/14 14:46:40 by cchauvet #+# #+# */
|
2023-02-16 10:29:46 -05:00
|
|
|
/* Updated: 2023/02/16 16:13:47 by cchauvet ### ########.fr */
|
2023-02-14 11:11:39 -05:00
|
|
|
/* */
|
|
|
|
/* ************************************************************************** */
|
|
|
|
|
|
|
|
#ifndef UTILS_H
|
|
|
|
# define UTILS_H
|
2023-02-01 11:28:38 -05:00
|
|
|
# include <stdlib.h>
|
|
|
|
# include "../libftx/libftx.h"
|
2023-03-10 06:32:39 -05:00
|
|
|
# include "../data/data.h"
|
|
|
|
# include "../env/env.h"
|
2023-02-01 11:28:38 -05:00
|
|
|
|
2023-02-06 14:41:10 -05:00
|
|
|
size_t ft_strncpy(char *dst, const char *src, size_t n);
|
2023-02-14 11:11:39 -05:00
|
|
|
int ft_is_in_quote(const char *str, size_t n);
|
2023-02-15 14:52:27 -05:00
|
|
|
char *ft_strreplace(const char *str, const char *fill,
|
2023-02-14 11:11:39 -05:00
|
|
|
size_t start, size_t stop);
|
2023-02-06 14:41:10 -05:00
|
|
|
ssize_t ft_strnchr(const char *str, char c);
|
|
|
|
char *ft_getstr(const char *str, size_t n);
|
2023-02-16 10:29:46 -05:00
|
|
|
int ft_str_is_empty(const char *str);
|
2023-02-15 14:52:27 -05:00
|
|
|
char **ft_split_quoted(const char *s, char c);
|
|
|
|
void ft_strshift(char *str, int shift);
|
|
|
|
char *ft_quote_remover(char *str);
|
2023-02-24 06:46:02 -05:00
|
|
|
int ft_atoi_check(const char *nptr);
|
2023-03-20 10:31:39 -04:00
|
|
|
char *ft_get_executable(t_data *data, const char *name);
|
2023-03-10 06:32:39 -05:00
|
|
|
void ft_closer(int fds[2]);
|
|
|
|
void ft_add_fd(int fds[2], int fd);
|
|
|
|
|
2023-02-01 11:28:38 -05:00
|
|
|
|
|
|
|
#endif
|