diff --git a/lib/std.js b/lib/std.js index 57f6eaa..fd37b1a 100644 --- a/lib/std.js +++ b/lib/std.js @@ -219,6 +219,10 @@ function CHR(ord) { return String.fromCharCode(ord); }; +function splitLn(s) { + return s.split(/\r?\n/); +}; + ///////////////////////////////////////////////////////////////////////////////// // Private APIs / Utility functions ///////////////////////////////////////////////////////////////////////////////// @@ -292,6 +296,7 @@ global.repeat = repeat; global.rotate = rotate; global.range = range; global.CHR = CHR; +global.splitLn = splitLn; exports.VERSIONINFO = "Standard Lib (std.js) version 0.4"; exports.global = global;