diff options
author | ZYunH <zyunhjob@163.com> | 2019-09-19 22:31:32 +0800 |
---|---|---|
committer | Kirill Danshin <kirill@danshin.pro> | 2019-09-20 06:33:34 +0300 |
commit | be93fbd21b9cb2641736175bb76c7d929079141c (patch) | |
tree | b3da2f350bb015227f7826786d69e424fdf2f901 /bytesconv.go | |
parent | Use 0xf instead of 15 (diff) | |
download | fasthttp-be93fbd21b9cb2641736175bb76c7d929079141c.tar.gz fasthttp-be93fbd21b9cb2641736175bb76c7d929079141c.tar.bz2 fasthttp-be93fbd21b9cb2641736175bb76c7d929079141c.zip |
Add lowerhex
Diffstat (limited to 'bytesconv.go')
-rw-r--r-- | bytesconv.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bytesconv.go b/bytesconv.go index e0262e7..d4fba67 100644 --- a/bytesconv.go +++ b/bytesconv.go @@ -296,7 +296,7 @@ func writeHexInt(w *bufio.Writer, n int) error { buf := v.([]byte) i := len(buf) - 1 for { - buf[i] = upperhex[n&0xf] + buf[i] = lowerhex[n&0xf] n >>= 4 if n == 0 { break @@ -327,6 +327,7 @@ var hex2intTable = func() []byte { const ( toLower = 'a' - 'A' upperhex = "0123456789ABCDEF" + lowerhex = "0123456789abcdef" ) var toLowerTable = func() [256]byte { |