Concatenate two JS strings.


JSString * JS_ConcatStrings(JSContext *cx, JSString *str1, JSString *str2);
Name Type Description
cx JSContext * The context in which both the strings have been created.
str1 JSString * First string to concatenate.
str2 JSString * Second string to concatenate.


JS_ConcatStrings concatenates two JS strings, str1 and str2, and returns the result. The result could be the same as one of the input strings, if the other string is zero length. When the string concatenation fails NULL is returned.

See Also

MXR ID Search for JS_ConcatStrings

Document Tags and Contributors

Contributors to this page: evilpie, nikhilm, Dmandelin
Last updated by: nikhilm,