📄 reader.js
字号:
$JSI.addCacheScript('js/io/reader.js',function(){this.hook = function(s){return eval(s);};eval(this.varText);function Reader(value) {this.value = value;this.position = 0;this.line = 0;}Reader.prototype.read = function () {var c = this.value.charAt(this.position++);if (c == "\n") {if (this.isNextEnd) {this.line++;this.isNextEnd = false;} else {if (this.value.charAt(this.position) == "\r") {this.isNextEnd = true;} else {this.line++;}}} else {if (c == "\r") {if (this.isNextEnd) {this.line++;this.isNextEnd = false;} else {if (this.value.charAt(this.position) == "\n") {this.isNextEnd = true;} else {this.line++;}}}}return c == "" ? null : c;};Reader.prototype.readLine = function () {if (this.position >= this.value.length) {return null;}if (this.isNextEnd) {this.position++;this.line++;this.isNextEnd = false;return "";}for (var p = this.position; p < this.value.length; p++) {var c = this.value.charAt(p);if (c == "\r" || c == "\n") {var line = this.value.substring(this.position, p);this.position = p + 1;if (c == "\r") {if (this.value[p + 1] == "\n") {this.position++;}} else {if (this.value[p + 1] == "\r") {this.position++;}}this.line++;return line;}}p = this.position;this.position = this.value.length;return this.value.substr(p);};Reader.prototype.reset = function () {this.position = 0;this.line = 0;return this;};Reader.prototype.toString = function () {return this.value + "";};});
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -