Added <num>_to_str functions

This commit is contained in:
Maieul BOYER 2024-07-16 19:38:27 +02:00
parent aafd056f49
commit 698d1088e2
No known key found for this signature in database
21 changed files with 963 additions and 60 deletions

View file

@ -27,7 +27,7 @@ t_error vec_buf_str_find(t_vec_buf_str *vec,
idx = 0;
while (idx < vec->len)
{
if (fn(&vec->buffer[idx]))
if (fn((const t_string *)&vec->buffer[idx]))
{
*index = idx;
return (NO_ERROR);
@ -48,7 +48,7 @@ t_error vec_buf_str_find_starting(t_vec_buf_str *vec,
idx = starting_index;
while (idx < vec->len)
{
if (fn(&vec->buffer[idx]))
if (fn((const t_string *)&vec->buffer[idx]))
{
*index = idx;
return (NO_ERROR);
@ -69,7 +69,7 @@ t_error vec_buf_str_all(t_vec_buf_str *vec,
*result = true;
while (*result && idx < vec->len)
{
if (!fn(&vec->buffer[idx]))
if (!fn((const t_string *)&vec->buffer[idx]))
*result = false;
idx++;
}
@ -87,7 +87,7 @@ t_error vec_buf_str_any(t_vec_buf_str *vec,
*result = false;
while (*result && idx < vec->len)
{
if (fn(&vec->buffer[idx]))
if (fn((const t_string *)&vec->buffer[idx]))
*result = true;
idx++;
}