Add binding for String.prototype.toUpperCase

This commit is contained in:
Michael Hoffmann
2018-07-01 23:12:42 +02:00
parent 58560f1408
commit d5d451b94b
2 changed files with 34 additions and 0 deletions

View File

@ -1078,6 +1078,14 @@ extern "C" {
#[wasm_bindgen(method, js_class = "String", js_name = toString)]
pub fn to_string(this: &JsString) -> JsString;
/// The toUpperCase() method returns the calling string value
/// converted to uppercase (the value will be converted to a
/// string if it isn't one).
///
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase
#[wasm_bindgen(method, js_class = "String", js_name = toUpperCase)]
pub fn to_upper_case(this: &JsString) -> JsString;
/// The trim() method removes whitespace from both ends of a string.
/// Whitespace in this context is all the whitespace characters
/// (space, tab, no-break space, etc.) and all the line terminator characters (LF, CR, etc.).