summaryrefslogtreecommitdiff
path: root/Base
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-08-28 12:02:27 +0100
committerLinus Groh <mail@linusgroh.de>2021-08-28 13:33:04 +0100
commitf70bed7339fda4211775eac4bcefefe95ffb9531 (patch)
tree3e073ac699249c21b89cb2d96f3e9db2c9aa0ce4 /Base
parentdc8e69eb44ca247dc40aed57cbda032cc03ca69b (diff)
downloadserenity-f70bed7339fda4211775eac4bcefefe95ffb9531.zip
Spreadsheet: Remove custom JS string split function implementation
Diffstat (limited to 'Base')
-rw-r--r--Base/res/js/Spreadsheet/runtime.js18
1 files changed, 1 insertions, 17 deletions
diff --git a/Base/res/js/Spreadsheet/runtime.js b/Base/res/js/Spreadsheet/runtime.js
index 5f99bd021c..7c98706f6b 100644
--- a/Base/res/js/Spreadsheet/runtime.js
+++ b/Base/res/js/Spreadsheet/runtime.js
@@ -109,27 +109,11 @@ function range(start, end, columnStep, rowStep) {
return cells;
}
-// FIXME: Remove this and use String.split() eventually
-function split(str, sep) {
- const parts = [];
- let splitIndex = -1;
- for (;;) {
- splitIndex = str.indexOf(sep);
- if (splitIndex == -1) {
- if (str.length) parts.push(str);
- break;
- }
- parts.push(str.substring(0, splitIndex));
- str = str.slice(splitIndex + sep.length);
- }
- return parts;
-}
-
function R(fmt, ...args) {
if (args.length !== 0) throw new TypeError("R`` format must be literal");
fmt = fmt[0];
- return range(...split(fmt, ":"));
+ return range(...fmt.split(":"));
}
function select(criteria, t, f) {