(buf, start, end)
| 1020 | } |
| 1021 | |
| 1022 | function utf8Slice(buf, start, end) { |
| 1023 | var res = "" |
| 1024 | var tmp = "" |
| 1025 | end = Math.min(buf.length, end) |
| 1026 | |
| 1027 | for (var i = start; i < end; i++) { |
| 1028 | if (buf[i] <= 0x7f) { |
| 1029 | res += decodeUtf8Char(tmp) + String.fromCharCode(buf[i]) |
| 1030 | tmp = "" |
| 1031 | } else { |
| 1032 | tmp += "%" + buf[i].toString(16) |
| 1033 | } |
| 1034 | } |
| 1035 | |
| 1036 | return res + decodeUtf8Char(tmp) |
| 1037 | } |
| 1038 | |
| 1039 | function asciiSlice(buf, start, end) { |
| 1040 | var ret = "" |
no test coverage detected
searching dependent graphs…