Search completed in 1.18 seconds.
1 results for "js_decodebytes":
JS_EncodeCharacters
Mozilla › Projects › SpiderMonkey › JSAPI reference › JS EncodeCharacters
or if the source buffer isn't proper UTF-16 because it contains unpaired surrogate values. The user is responsible for allocating and freeing the memory of the destination string. JS_EncodeCharacters never adds a trailing null character. To obtain a null-terminated string, allocate an extra byte for the null character and set it manually. To convert bytes to jschars, the opposite conversion, use JS_DecodeBytes. To convert a JSString to a C char string, use JS_EncodeString or JS_GetStringBytes. See Also bug 805080 ...