Feature suggestion
I'd love a syntax like this:
letutf8Ptr=memory.data<u8>("Hello");letutf16Ptr=memory.data<u16>("Hello");At the moment I'm doing this at runtime instead:
letbytes=String.UTF8.byteLength(str,true);letutf8Ptr=heap.alloc(bytes);String.UTF8.encodeUnsafe(changetype<usize>(str),str.length,utf8Ptr,true);
I could use String.UTF8.encode() instead, and then store the ArrayBuffer so it doesn't get GC'd, but as far as I can tell, that still ends up embedding the UTF-16 string in the output.
Feature suggestion
I'd love a syntax like this:
At the moment I'm doing this at runtime instead:
I could use
String.UTF8.encode()instead, and then store theArrayBufferso it doesn't get GC'd, but as far as I can tell, that still ends up embedding the UTF-16 string in the output.