AcornSearch - Acorn and RISC OS information searching
RISC OS Search
containing
"Nutty quip goes here!"
Home  |  About  |  Filebase Archive  |  StrongHelp Manuals  |  Newsgroups  |  Module Database
Entry:     JS_NewStringCopyZ (Function)
Summary:     Creates a new JS string and ensures that the resulting string is null-terminated.
Syntax:
JSString * JS_NewStringCopyZ(JSContext *cx, const char *s);

     Argument     Type     Description
     cx     JSContext *     Pointer to a JS context from which to derive runtime information.
                 
     s     const char *     Pointer to the character array containing the text for the JS string to create.
                 
Description:
JS_NewStringCopyZ allocates space for a new JS string and its underlying storage, and then copies the contents of a C character array, s, into the new string. The new JS string is guaranteed to be null-terminated.

If the allocation is successful, JS_NewStringCopyZ returns a pointer to the JS string. Otherwise it returns an empty string.


See also:
JS_CompareStrings
JS_ConvertValue
JS_GetEmptyStringValue
JS_GetStringBytes
JS_GetStringChars
JS_GetStringLength
JS_InternString
JS_InternUCString
JS_InternUCStringN
JS_NewArrayObject
JS_NewDouble
JS_NewFunction
JS_NewObject
JS_NewString
JS_NewStringCopyN
JS_NewUCString
JS_NewUCStringCopyN
JS_NewUCStringCopyZ
JS_ValueToString
JS_malloc

[sh-index] Back to list of manuals