diff options
Diffstat (limited to 'lib/hex.go')
-rw-r--r-- | lib/hex.go | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -44,16 +44,6 @@ func HexStrToAsciiStr(h string) string { return a } -func ByteToHexStr(b byte) string { - p := DecToHexChar(uint16(b >> 4)) - q := DecToHexChar(uint16(b & 0xf)) - - s := string(p) - s += string(q) - - return s -} - func AsciiStrToHexStr(as string) string { hs := "" if len(as) < 1 { @@ -66,3 +56,13 @@ func AsciiStrToHexStr(as string) string { } return hs } + +func ByteToHexStr(b byte) string { + p := DecToHexChar(uint16(b >> 4)) + q := DecToHexChar(uint16(b & 0xf)) + + s := string(p) + s += string(q) + + return s +} |