feat: string find

This commit is contained in:
2025-09-08 02:48:47 +02:00
parent 71ac226e50
commit a21f759d23
3 changed files with 59 additions and 3 deletions

View File

@@ -28,6 +28,10 @@ void test_str2(void) {
assert(mcl_string_length(s1) == 50);
assert(mcl_string_capacity(s1) == 64);
/* Find substring in string */
int pos = mcl_string_find(s1, "is");
assert(pos == 2);
mcl_string_free(s1);
mcl_string_free(s2);
mcl_string_free(extend_me);