Index: src/js/string.js |
diff --git a/src/js/string.js b/src/js/string.js |
index cd1bcdbc29216d5526974ef4b4e78b96b5aa34b8..33a3e72143ca5020c8a9441d6a9b08f63c581f04 100644 |
--- a/src/js/string.js |
+++ b/src/js/string.js |
@@ -487,6 +487,38 @@ |
} |
+// ECMA-262, 15.5.4.16 |
+function StringToLowerCaseJS() { |
+ CHECK_OBJECT_COERCIBLE(this, "String.prototype.toLowerCase"); |
+ |
+ return %StringToLowerCase(TO_STRING(this)); |
+} |
+ |
+ |
+// ECMA-262, 15.5.4.17 |
+function StringToLocaleLowerCase() { |
+ CHECK_OBJECT_COERCIBLE(this, "String.prototype.toLocaleLowerCase"); |
+ |
+ return %StringToLowerCase(TO_STRING(this)); |
+} |
+ |
+ |
+// ECMA-262, 15.5.4.18 |
+function StringToUpperCaseJS() { |
+ CHECK_OBJECT_COERCIBLE(this, "String.prototype.toUpperCase"); |
+ |
+ return %StringToUpperCase(TO_STRING(this)); |
+} |
+ |
+ |
+// ECMA-262, 15.5.4.19 |
+function StringToLocaleUpperCase() { |
+ CHECK_OBJECT_COERCIBLE(this, "String.prototype.toLocaleUpperCase"); |
+ |
+ return %StringToUpperCase(TO_STRING(this)); |
+} |
+ |
+ |
// ES6 draft, revision 26 (2014-07-18), section B.2.3.2.1 |
function HtmlEscape(str) { |
return %_Call(StringReplace, TO_STRING(str), /"/g, """); |
@@ -795,6 +827,10 @@ |
"substring", StringSubstring, |
"substr", StringSubstr, |
"startsWith", StringStartsWith, |
+ "toLowerCase", StringToLowerCaseJS, |
+ "toLocaleLowerCase", StringToLocaleLowerCase, |
+ "toUpperCase", StringToUpperCaseJS, |
+ "toLocaleUpperCase", StringToLocaleUpperCase, |
"link", StringLink, |
"anchor", StringAnchor, |