MCPcopy Create free account
hub / github.com/melonjs/melonJS / toHex

Function toHex

packages/melonjs/src/utils/string.ts:41–48  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

39 * @returns the converted hexadecimal value
40 */
41export function toHex(str: string) {
42 let res = "";
43 let c = 0;
44 while (c < str.length) {
45 res += str.charCodeAt(c++).toString(16);
46 }
47 return res;
48}
49
50/**
51 * returns true if the given string is a data url in the `data:[<mediatype>][;base64],<data>` format.

Callers 1

resetGUIDFunction · 0.90

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected