summaryrefslogtreecommitdiffstats
path: root/js/src/builtin/String.js
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-05-17 01:04:30 +0000
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-05-17 01:04:30 +0000
commit354c6dceecdad5e58e2763e937ad5053e8b7d897 (patch)
tree69eea60a43998969da2a565bccf2a240340ed1a8 /js/src/builtin/String.js
parentf932fb94d87bcba20325ba6978595cbf6be4dcb2 (diff)
downloadUXP-354c6dceecdad5e58e2763e937ad5053e8b7d897.tar
UXP-354c6dceecdad5e58e2763e937ad5053e8b7d897.tar.gz
UXP-354c6dceecdad5e58e2763e937ad5053e8b7d897.tar.lz
UXP-354c6dceecdad5e58e2763e937ad5053e8b7d897.tar.xz
UXP-354c6dceecdad5e58e2763e937ad5053e8b7d897.zip
Implement String.prototype.trimStart and trimEnd.
This renames our internal function names because *Left and *Right might be deprecated and have to be removed later, making that trivial. Resolves #1089
Diffstat (limited to 'js/src/builtin/String.js')
-rw-r--r--js/src/builtin/String.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/js/src/builtin/String.js b/js/src/builtin/String.js
index e5b2ad552..f830b1aa2 100644
--- a/js/src/builtin/String.js
+++ b/js/src/builtin/String.js
@@ -828,16 +828,16 @@ function String_static_trim(string) {
return callFunction(std_String_trim, string);
}
-function String_static_trimLeft(string) {
+function String_static_trimStart(string) {
if (arguments.length < 1)
- ThrowTypeError(JSMSG_MISSING_FUN_ARG, 0, 'String.trimLeft');
- return callFunction(std_String_trimLeft, string);
+ ThrowTypeError(JSMSG_MISSING_FUN_ARG, 0, 'String.trimStart');
+ return callFunction(std_String_trimStart, string);
}
-function String_static_trimRight(string) {
+function String_static_trimEnd(string) {
if (arguments.length < 1)
- ThrowTypeError(JSMSG_MISSING_FUN_ARG, 0, 'String.trimRight');
- return callFunction(std_String_trimRight, string);
+ ThrowTypeError(JSMSG_MISSING_FUN_ARG, 0, 'String.trimEnd');
+ return callFunction(std_String_trimEnd, string);
}
function String_static_toLocaleLowerCase(string) {