Support String.prototype.concat

This commit is contained in:
Satoshi Amemiya
2018-06-27 00:48:09 +09:00
parent 947dfbeae0
commit 3d72a90481
2 changed files with 39 additions and 0 deletions

View File

@ -447,6 +447,13 @@ extern {
#[wasm_bindgen(method, js_class = "String", js_name = charAt)]
pub fn char_at(this: &JsString, index: u32) -> JsString;
/// The concat() method concatenates the string arguments to the calling string and returns a new string.
///
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/concat
#[wasm_bindgen(method, js_class = "String")]
pub fn concat(this: &JsString, string_2: &JsString) -> JsString;
/// The indexOf() method returns the index within the calling String object of
/// the first occurrence of the specified value, starting the search at fromIndex.
/// Returns -1 if the value is not found.