MCPcopy Create free account
hub / github.com/bitpay/bitcore-message / hexSlice

Function hexSlice

bitcore-message.js:1325–1336  ·  view source on GitHub ↗
(buf, start, end)

Source from the content-addressed store, hash-verified

1323}
1324
1325function hexSlice (buf, start, end) {
1326 var len = buf.length
1327
1328 if (!start || start < 0) start = 0
1329 if (!end || end < 0 || end > len) end = len
1330
1331 var out = ''
1332 for (var i = start; i < end; ++i) {
1333 out += toHex(buf[i])
1334 }
1335 return out
1336}
1337
1338function utf16leSlice (buf, start, end) {
1339 var bytes = buf.slice(start, end)

Callers 1

slowToStringFunction · 0.85

Calls 1

toHexFunction · 0.85

Tested by

no test coverage detected