websock.js: simplify rQshiftStr with apply().
This commit is contained in:
parent
068065e465
commit
53b074e8e7
|
|
@ -129,9 +129,7 @@ function rQshiftStr(len) {
|
||||||
if (typeof(len) === 'undefined') { len = rQlen(); }
|
if (typeof(len) === 'undefined') { len = rQlen(); }
|
||||||
var arr = rQ.slice(rQi, rQi + len);
|
var arr = rQ.slice(rQi, rQi + len);
|
||||||
rQi += len;
|
rQi += len;
|
||||||
return arr.map(function (num) {
|
return String.fromCharCode.apply(null, arr);
|
||||||
return String.fromCharCode(num); } ).join('');
|
|
||||||
|
|
||||||
}
|
}
|
||||||
function rQshiftBytes(len) {
|
function rQshiftBytes(len) {
|
||||||
if (typeof(len) === 'undefined') { len = rQlen(); }
|
if (typeof(len) === 'undefined') { len = rQlen(); }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue