JavaScript-1.5 Reference

JS_ValueToString Function

Summary

Converts a JS value to a JS string.

Syntax

JSString * JS_ValueToString(JSContext *cx, jsval v);
NameTypeDescription
cxJSContext *Pointer to a JS context from which to derive runtime information.
vjsvalThe JS value to convert.

Description

JS_ValueToString converts a specified JS value, v, to a JS string. The actual conversion is performed by the object's convert operation. JS_ValueToString always returns a pointer to a string. The original value is untouched.

Notes

Converting a JS value to a string subjects the resulting string to garbage collection unless you protect against it using a local root, an object property, or the JS_AddRoot function.

See Also

Groups [ Function ]
Documents [ LXR ID Search ]
Entries [ JS_AddRoot | JS_ConvertArguments | JS_ConvertValue | JS_GetTypeName | JS_TypeOfValue | JS_ValueToBoolean | JS_ValueToFunction | JS_ValueToInt32 | JS_ValueToNumber | JS_ValueToObject ]

This page was generated by APIDOC