feat: 补全 String locale 三方法与 localeCompare 基本档

This commit is contained in:
2026-09-21 01:58:31 +00:00
parent 46211a66a5
commit 7481ceb798
6 changed files with 649 additions and 2 deletions
+3
View File
@@ -247,6 +247,9 @@ impl BuiltinWorld {
("substring", methods.substring, 2),
("toUpperCase", methods.to_upper_case, 0),
("toLowerCase", methods.to_lower_case, 0),
("toLocaleUpperCase", methods.to_locale_upper_case, 0),
("toLocaleLowerCase", methods.to_locale_lower_case, 0),
("localeCompare", methods.locale_compare, 1),
("trim", methods.trim, 0),
("repeat", methods.repeat, 1),
("padStart", methods.pad_start, 1),
@@ -122,6 +122,9 @@ pub struct StringMethods {
pub is_well_formed: *const (),
pub to_well_formed: *const (),
pub from_raw: *const (),
pub to_locale_lower_case: *const (),
pub to_locale_upper_case: *const (),
pub locale_compare: *const (),
}
/// RegExp 原型方法的 native 函数指针集合。