mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-12 12:31:22 +00:00
Add binding for String.prototype.localeCompare
This commit is contained in:
@ -2996,6 +2996,14 @@ extern "C" {
|
||||
#[wasm_bindgen(method, js_class = "String", js_name = lastIndexOf)]
|
||||
pub fn last_index_of(this: &JsString, search_value: &str, from_index: i32) -> i32;
|
||||
|
||||
/// The localeCompare() method returns a number indicating whether
|
||||
/// a reference string comes before or after or is the same as
|
||||
/// the given string in sort order.
|
||||
///
|
||||
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare
|
||||
#[wasm_bindgen(method, js_class = "String", js_name = localeCompare)]
|
||||
pub fn locale_compare(this: &JsString, compare_string: &str, locales: &Array, options: &Object) -> i32;
|
||||
|
||||
/// The normalize() method returns the Unicode Normalization Form
|
||||
/// of a given string (if the value isn't a string, it will be converted to one first).
|
||||
///
|
||||
|
Reference in New Issue
Block a user