websock.js: simplify rQshiftStr with apply().

This commit is contained in:
Joel Martin
2012-08-16 13:27:50 -05:00
parent 068065e465
commit 53b074e8e7
+1 -3
View File
@@ -129,9 +129,7 @@ function rQshiftStr(len) {
if (typeof(len) === 'undefined') { len = rQlen(); }
var arr = rQ.slice(rQi, rQi + len);
rQi += len;
return arr.map(function (num) {
return String.fromCharCode(num); } ).join('');
return String.fromCharCode.apply(null, arr);
}
function rQshiftBytes(len) {
if (typeof(len) === 'undefined') { len = rQlen(); }