lookChar refactoring
This commit is contained in:
parent
ba87d2fe11
commit
19e8f2f059
8 changed files with 251 additions and 272 deletions
|
@ -114,7 +114,7 @@ var ChunkedStream = (function ChunkedStreamClosure() {
|
|||
getByte: function ChunkedStream_getByte() {
|
||||
var pos = this.pos;
|
||||
if (pos >= this.end) {
|
||||
return null;
|
||||
return -1;
|
||||
}
|
||||
this.ensureRange(pos, pos + 1);
|
||||
return this.bytes[this.pos++];
|
||||
|
@ -152,22 +152,6 @@ var ChunkedStream = (function ChunkedStreamClosure() {
|
|||
return this.bytes.subarray(begin, end);
|
||||
},
|
||||
|
||||
lookChar: function ChunkedStream_lookChar() {
|
||||
var pos = this.pos;
|
||||
if (pos >= this.end)
|
||||
return null;
|
||||
this.ensureRange(pos, pos + 1);
|
||||
return String.fromCharCode(this.bytes[pos]);
|
||||
},
|
||||
|
||||
getChar: function ChunkedStream_getChar() {
|
||||
var pos = this.pos;
|
||||
if (pos >= this.end)
|
||||
return null;
|
||||
this.ensureRange(pos, pos + 1);
|
||||
return String.fromCharCode(this.bytes[this.pos++]);
|
||||
},
|
||||
|
||||
skip: function ChunkedStream_skip(n) {
|
||||
if (!n)
|
||||
n = 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue