This commit is contained in:
2026-07-31 18:17:54 +02:00
parent 7f2713eeff
commit 52cdc7d36b
3 changed files with 27 additions and 17 deletions
+5 -5
View File
@@ -433,7 +433,7 @@ void string_split_test_1(void)
{
TRACEF("\n");
Str str1 = S("a:bb|ccc");
Str str1 = S("|a:bb|ccc|");
Str sep = S("|:");
STRVEC_DEFINE(strings, 16);
@@ -470,13 +470,13 @@ void string_test_misc(void)
Str str4_trim = str_ascii_trim(str4);
printf("str4_trim: '%.*s'\n", str4_trim.len, str4_trim.str);
S64 found = str_substr(str1, S("World"));
S64 found = str_index(str1, S("World"));
printf("1. found %ld\n", found);
found = str_substr(str_empty(), S("World"));
found = str_index(str_empty(), S("World"));
printf("2. found %ld\n", found);
found = str_substr(str_empty(), S(""));
found = str_index(str_empty(), S(""));
printf("3. found %ld\n", found);
found = str_substr(str1, S(" "));
found = str_index(str1, S(" "));
printf("4. found %ld\n", found);
}