This article covers features introduced in SpiderMonkey 38
Returns the length of the char buffer required to encode given string as UTF8.
size_t GetDeflatedUTF8StringLength(JSFlatString* s);
||The pointer to the string to calculate the length.|
JS::GetDeflatedUTF8StringLength returns the length of the char buffer required to encode
s as UTF8. The returned length does not include the null-terminator.