MCPcopy Index your code
hub / github.com/angular/angular / byteStringToHexString

Function byteStringToHexString

packages/service-worker/worker/src/sha1.ts:169–176  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

167}
168
169function byteStringToHexString(str: string): string {
170 let hex: string = '';
171 for (let i = 0; i < str.length; i++) {
172 const b = byteAt(str, i);
173 hex += (b >>> 4).toString(16) + (b & 0x0f).toString(16);
174 }
175 return hex.toLowerCase();
176}
177
178// based on https://www.danvk.org/hex2dec.html (JS can not handle more than 56b)
179function byteStringToDecString(str: string): string {

Callers 1

_sha1Function · 0.70

Calls 2

byteAtFunction · 0.70
toStringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…