strings: preserve UTF-8 and boundary invariants

This commit is contained in:
2026-08-09 17:46:22 +09:00
parent 2d947c469e
commit 8e2e6ae162
7 changed files with 124 additions and 61 deletions

View File

@@ -7,6 +7,7 @@ package strings_test;
import strings;
import os;
import test;
// ref/hare/strings/replace.ha:46 (#4). Hare rows 1-5 (target found
// once / multiple times / shorter / longer / multibyte) plus ww rows
@@ -108,3 +109,7 @@ import os;
};
};
@test fn replace_empty_needle_aborts() void = {
test.expectabort();
strings.replace("abc", "", "x");
};