Entry: JS_NewUCStringCopyZ (Function)
Summary: Creates a new Unicode-encoded JS string and ensures that the resulting string is null-terminated.
Syntax:
JSString * JS_NewUCStringCopyZ(JSContext *cx, const jschar *s);
Argument Type Description
cx JSContext * Pointer to a JS context from which to derive runtime information.
s const jschar * Pointer to the character array containing the text for the JS string to create.
Description:
JS_NewUCStringCopyZ allocates space for a new, Unicode-encoded JS string and its underlying storage, and then copies the contents of a character array, s, into the new string. The new JS string is guaranteed to be null-terminated.
If the allocation is successful, JS_NewUCStringCopyZ returns a pointer to the JS string. Otherwise it returns an empty string.
See also:
|
|
|