Closed
Description
"abcde".replaceAll("a", "---")
results in the string ---bc
, whereas I would expect it to return ---bcde
.
To reproduce:
import "wasi";
import { Console} from "as-wasi";
const foo = "abcde".replaceAll("a", "---");
Console.log(foo);
{
"scripts": {
"build": "asc assembly/index.ts -b build/index.wasm -t build/index.wat --runtime half",
"start": "wasmtime --dir . build/index.wasm"
},
"devDependencies": {
"assemblyscript": "0.17.3"
},
"dependencies": {
"as-wasi": "0.4.4"
}
}