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_NewUCString (Function)
Summary:     Allocates a new JS Unicode-encoded string.
Syntax:
JSString * JS_NewUCString(JSContext *cx, jschar *chars,
size_t length);

     Argument     Type     Description
     cx     JSContext *     Pointer to a JS context from which to derive runtime information.
                 
     chars     jschar *     Pointer to the Unicode-encoded character array containing the text for the JS string to create.
                 
     length     size_t     Number of characters in the text string.
                 
Description:
JS_NewUCString uses the memory starting at chars and ending at chars + length as storage for the Unicode-encoded JS string it returns. This means that your application is permitting the JS engine to handle this memory region. Your application should not free or otherwise manipulate this region of memory. 

Using JS_NewUCString is analogous to assigning char * variables in C, and can save needless copying of data. If successful, JS_NewUCString returns a pointer to the JS string. Otherwise it returns NULL.


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_NewStringCopyZ
JS_NewUCStringCopyN
JS_NewUCStringCopyZ
JS_ValueToString
JS_malloc

[sh-index] Back to list of manuals