fix: 修复 String 原型方法边界条件

This commit is contained in:
爱特每羊队
2026-06-27 19:45:18 +08:00
parent a1993e617d
commit f9297097bf
4 changed files with 571 additions and 28 deletions
+6
View File
@@ -137,6 +137,9 @@ pub struct StringMethods {
pub match_all: *const (),
pub replace_all: *const (),
pub value_of: *const (),
pub substr: *const (),
pub at: *const (),
pub last_index_of: *const (),
}
pub struct RegExpMethods {
@@ -1048,6 +1051,9 @@ impl BuiltinWorld {
("matchAll", methods.match_all, 1),
("replaceAll", methods.replace_all, 2),
("valueOf", methods.value_of, 0),
("substr", methods.substr, 2),
("at", methods.at, 1),
("lastIndexOf", methods.last_index_of, 1),
);
}