Why `Long.toHexString()` produces a different str...
# stdlib
e
Why
Long.toHexString()
produces a different string comparing to Java one? There are extra
0
padding
I mean it is still same Long but wonder why format is different
And I got same output if I use removeLeadingZeros = true
k
With
removeLeadingZeros = true
the output is not the same (see playground).
e
True, I didn't notice we also have extra code to add padding zeros ourselves
k
You can delete the extra code to add padding zeros and use
NumberFormat.minLength
. That will make it much more succinct.