Creates new HexString instance from regular string. If specified string already starts with "0x" prefix, it will not add another one
const string = "string";
new HexString(string); // "0xstring"
String to convert
Private
Readonly
hexStatic
ensureEnsures hexString
is instance of HexString
class
New HexString if hexString
is regular string or hexString
if it is HexString instance
const regularString = "string";
const hexString = new HexString("string"); // "0xstring"
HexString.ensure(regularString); // "0xstring"
HexString.ensure(hexString); // "0xstring"
String to check
Static
fromStatic
fromGenerated using TypeDoc
A util class for working with hex strings. Hex strings are strings that are prefixed with
0x