* Return the [[DataHexString]] result by stripping all **leading** ** zero bytes from %%data%%.
(data)
| 129 | ** zero bytes from %%data%%. |
| 130 | */ |
| 131 | function stripZerosLeft(data) { |
| 132 | let bytes = hexlify(data).substring(2); |
| 133 | while (bytes.startsWith("00")) { |
| 134 | bytes = bytes.substring(2); |
| 135 | } |
| 136 | return "0x" + bytes; |
| 137 | } |
| 138 | exports.stripZerosLeft = stripZerosLeft; |
| 139 | function zeroPad(data, length, left) { |
| 140 | const bytes = getBytes(data); |