Closed
Description
It seems that adding a main function makes String.split
not work.
Here is the working example: https://webassembly.studio/?f=mn7zhulmmq9
If you build and runtestSplit
it returns 13 to the console.
export function testSplit(): i32 {
let str = "hell o o o o - - - - - - - -";
let strs = str.split(" ");
return strs.length;
}
// export function main(): void {
// }
If you uncomment the main function, build, and rerun it returns be 1.