size_t JS_GetStringLength(JSString *str);
||The string to examine.|
JS_GetStringLength reports the length, in 16-bit code units, of the string
str. This is the same as the
length property of the string. This is the same as the length of the array returned by
char16_ts (not bytes).
Because some Unicode characters are represented using two 16-bit code units, the result is not necessarily the same as the number of Unicode characters in the string.