export function padLeft(n, amount, pad) {
    if (pad === void 0) { pad = '0'; }
    var str = n + '';
    for (var i = str.length; i < amount; i++) {
        str = pad + str;
    }
    return str;
}
export function padRight(n, amount, pad) {
    if (pad === void 0) { pad = '0'; }
    var str = n + '';
    for (var i = str.length; i < amount; i++) {
        str += pad;
    }
    return str;
}
export function hexStringToByte(str) {
    if (!str) {
        return new Uint8Array(0);
    }
    var a = [];
    var len = str.length;
    for (var i = 0; i < len; i += 2) {
        a.push(parseInt(str.substr(i, 2), 16));
    }
    return new Uint8Array(a);
}
//# sourceMappingURL=string.js.map