Builtin for String.prototype.concat (single int-arg version)

This commit is contained in:
2008-08-09 22:15:21 -04:00
parent ef23c36278
commit 0a2d9afe75
5 changed files with 19 additions and 5 deletions

View File

@@ -241,6 +241,15 @@ builtin_Math_random(JSRuntime* rt)
return z;
}
JSString* FASTCALL
builtin_String_p_concat_1int(JSContext* cx, JSString* str, jsint i)
{
JSString* istr = js_NumberToString(cx, i);
if (!istr)
return NULL;
return js_ConcatStrings(cx, str, istr);
}
bool FASTCALL
builtin_EqualStrings(JSString* str1, JSString* str2)
{