APIs for reading and writing strings from memory
You'll now find three new api calls in chasms embedding api:
- readUtf8String()
- writeUtf8String()
- readNullTerminatedUtf8String()
The latter of the three is useful when dealing with modules created by languages like C which use null terminating bytes to signal the end of a string. I've done what I can to optimise the algorithm which finds the null byte on native, which is powered by a wide SIMD search. The Java impl is more primitive but will be improved in the future when I start to specialise the JVM memory implementation.