mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-22 17:21:35 +00:00
Merge branch 'string-includes' of https://github.com/rail44/wasm-bindgen into string-includes
This commit is contained in:
@ -474,6 +474,12 @@ extern {
|
||||
#[wasm_bindgen(method, js_class = "String", js_name = indexOf)]
|
||||
pub fn index_of(this: &JsString, search_value: &JsString, from_index: i32) -> i32;
|
||||
|
||||
/// The includes() method determines whether one string may be found within another string, returning true or false as appropriate.
|
||||
///
|
||||
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes
|
||||
#[wasm_bindgen(method, js_class = "String")]
|
||||
pub fn includes(this: &JsString, search_string: &JsString, position: i32) -> bool;
|
||||
|
||||
/// The slice() method extracts a section of a string and returns it as a
|
||||
/// new string, without modifying the original string.
|
||||
///
|
||||
|
Reference in New Issue
Block a user