Trim left only, not right

This commit is contained in:
Taylor Gerring 2015-04-02 12:30:42 +02:00
parent f89baa73e5
commit cc45b4d8b5
1 changed files with 1 additions and 1 deletions

View File

@ -104,7 +104,7 @@ func (d *hexnum) String() string {
// Get hex string from bytes
out := common.Bytes2Hex(d.data)
// Trim leading 0s
out = strings.Trim(out, "0")
out = strings.TrimLeft(out, "0")
// Output "0x0" when value is 0
if len(out) == 0 {
out = "0"