feat(utils): string utils + corresponding tests

This commit is contained in:
Matteo Flebus 2026-01-08 17:03:52 +01:00
parent 453a8ab0da
commit af1af49ae1
4 changed files with 140 additions and 22 deletions

View file

@ -0,0 +1,16 @@
#include "utils/string_utils/string_utils.h"
ssize_t skip_blanks(char **str)
{
if (str == NULL || *str == NULL)
{
return 0;
}
ssize_t skipped = 0;
while (str[skipped] != '\0' && !isblank(str[skipped]))
{
skipped++;
}
*str += skipped;
return skipped;
}