diff options
author | obscuren <geffobscura@gmail.com> | 2015-04-03 23:19:22 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-04-03 23:19:22 +0800 |
commit | ec8a6e0a2b74c5755ebab97e438b00f8765851fe (patch) | |
tree | 8c59bc962eec32b2ffb67cd7cff5fb4c93056b68 /common | |
parent | 36452afd4e31083d748155e5e5ddd682128aa9b0 (diff) | |
parent | f9d94c7462bbb3a0c463427baefc68555f853dee (diff) | |
download | go-tangerine-ec8a6e0a2b74c5755ebab97e438b00f8765851fe.tar go-tangerine-ec8a6e0a2b74c5755ebab97e438b00f8765851fe.tar.gz go-tangerine-ec8a6e0a2b74c5755ebab97e438b00f8765851fe.tar.bz2 go-tangerine-ec8a6e0a2b74c5755ebab97e438b00f8765851fe.tar.lz go-tangerine-ec8a6e0a2b74c5755ebab97e438b00f8765851fe.tar.xz go-tangerine-ec8a6e0a2b74c5755ebab97e438b00f8765851fe.tar.zst go-tangerine-ec8a6e0a2b74c5755ebab97e438b00f8765851fe.zip |
Merge branch 'develop' into glog
Diffstat (limited to 'common')
-rw-r--r-- | common/bytes.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/bytes.go b/common/bytes.go index 2d885ac74..5bdacd810 100644 --- a/common/bytes.go +++ b/common/bytes.go @@ -127,6 +127,11 @@ func CopyBytes(b []byte) (copiedBytes []byte) { return } +func HasHexPrefix(str string) bool { + l := len(str) + return l >= 2 && str[0:2] == "0x" +} + func IsHex(str string) bool { l := len(str) return l >= 4 && l%2 == 0 && str[0:2] == "0x" |