15 #include "../ft_math/ft_math.h"
16 #include "../ft_mem/ft_mem.h"
22 t_vect *vect,
const void *value,
size_t count,
int is_str)
31 new_len = vect->
len + count;
32 if (vect->
cap < (new_len + is_str) && !
vect_reserve(vect, new_len + is_str))
34 bytes_to_copy = vect->
elemsize * count;
36 value, bytes_to_copy);
39 ((
char *)(vect->
p))[vect->
len] =
'\0';
bool can_addp(size_t a, size_t b)
bool can_mulp(size_t a, size_t b)
void * ft_memmove(void *dst, const void *src, size_t n)
bool vect_reserve(t_vect *vect, size_t newcap)
static const int g_flag_not_string
static bool vect_append_internal(t_vect *vect, const void *value, size_t count, int is_str)
static const int g_flag_string
bool vect_append_str(t_vect *vect, const char *value, size_t count)
bool vect_append_range(t_vect *vect, const void *value, size_t count)