That's what I use already but it needs flat string and direct memory pointer. What I was thinking was directly passing JsVar of type string or typed array and iterating over it inside inline c even if it not flat string. Not super important but would solve cases with fragmented memory when E.toString does not work.
Like the sort case above, some smaller arrays are not allocated as flat buffers so to sort every array it needs some extra code like this or this
© Espruino, powered by microcosm.
Report a problem