Normed the headers of stdme
This commit is contained in:
parent
61ef75f212
commit
3914f0621f
2 changed files with 17 additions and 17 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/05/19 23:30:46 by maiboyer #+# #+# */
|
||||
/* Updated: 2024/07/22 15:10:45 by maiboyer ### ########.fr */
|
||||
/* Updated: 2024/07/30 16:41:44 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
# define STR_H
|
||||
|
||||
# include "me/types.h"
|
||||
#include "me/vec/vec_str.h"
|
||||
# include "me/vec/vec_str.h"
|
||||
/// @brief Get the length of a string
|
||||
/// @param str the string
|
||||
/// @return the length of the string
|
||||
|
|
@ -106,7 +106,7 @@ t_str str_map(t_const_str s, char (*f)(t_usize, char));
|
|||
/// @param chr the list of chars to be used as word delimiter
|
||||
/// @param out[out] the returned value, a vector of words
|
||||
/// @return True in case of error, false otherwise
|
||||
t_error str_split(t_const_str str, t_const_str chrs, t_vec_str *out);
|
||||
t_error str_split(t_const_str str, t_const_str chrs, t_vec_str *out);
|
||||
|
||||
/// @brief Remove consecutive leading and trailing characters from a string
|
||||
/// @param str the string to trim
|
||||
|
|
@ -116,7 +116,7 @@ t_str str_trim(t_const_str str, t_const_str charset);
|
|||
|
||||
/// @brief Remove consecutive leading and trailing characters from a string
|
||||
/// @param str the string to free
|
||||
static inline void str_free(t_str str)
|
||||
static inline void str_free(t_str str)
|
||||
{
|
||||
void mem_free(void *ptr);
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/11/03 14:31:12 by maiboyer #+# #+# */
|
||||
/* Updated: 2024/07/26 13:55:48 by maiboyer ### ########.fr */
|
||||
/* Updated: 2024/07/30 16:40:58 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -18,6 +18,18 @@
|
|||
# include <stdint.h>
|
||||
# include <unistd.h>
|
||||
|
||||
# ifndef ERROR
|
||||
/// @def signal that an error occured
|
||||
# define ERROR 1
|
||||
# else
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
|
||||
# ifndef NO_ERROR
|
||||
/// @def signal that no error occured
|
||||
# define NO_ERROR 0
|
||||
# endif
|
||||
|
||||
/// @brief A string, null terminated
|
||||
typedef char *t_str;
|
||||
/// @brief A constant string, null terminated
|
||||
|
|
@ -64,16 +76,4 @@ void me_exit(t_i32 code);
|
|||
/// @brief a function that prints the current stack trace
|
||||
void print_trace(void);
|
||||
|
||||
|
||||
# ifndef ERROR
|
||||
/// @def signal that an error occured
|
||||
# define ERROR 1
|
||||
# else
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
|
||||
# ifndef NO_ERROR
|
||||
/// @def signal that no error occured
|
||||
# define NO_ERROR 0
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue