Documentation
¶
Index ¶
- func Bytes2Hexstring(bs []byte, upper bool) string
- func Bytes2Ip(bs []byte) net.IP
- func Bytes2Ipstring(bs []byte) string
- func Bytes2String(bs []byte) string
- func Bytes2Timestr(bs []byte, fmt string) string
- func Bytes2Uint16(bs []byte) uint16
- func Bytes2Uint32(bs []byte) uint32
- func Bytes2Uint64(bs []byte) uint64
- func CompareNoCaseString(s1 string, s2 string) int
- func FlipBytes(bs []byte) []byte
- func Hexstring2Bytes(hexstring string) []byte
- func Ip2Bytes(ip net.IP) []byte
- func Ip2Ipstring(ip net.IP) string
- func IpEqual(ip1 net.IP, ip2 net.IP) bool
- func IpVersion(ip net.IP) int
- func Ipstring2Bytes(ipstr string) []byte
- func Ipstring2Ip(ipstr string) net.IP
- func IpstringEqual(ip1 string, ip2 string) bool
- func Nanosecond2Time(nanosecond int64) time.Time
- func Second2Time(second int64) time.Time
- func Second2Timestr(second int64, fmt string) string
- func String2Bytes(str string) []byte
- func StringDelSpace(str string) string
- func StringTrim(str string) string
- func StringTrimLeft(str string) string
- func StringTrimRight(str string) string
- func Time2Nanosecond(t time.Time) int64
- func Time2Second(t time.Time) int64
- func Time2Timestr(t time.Time, fmt string) string
- func Timestr2Bytes(timestr string, fmt string) [4]byte
- func Timestr2Second(timestr string, fmt string) int
- func Timestr2Time(timestr string, fmt string) time.Time
- func Uint162Bytes(x uint16) [2]byte
- func Uint322Bytes(x uint32) [4]byte
- func Uint642Bytes(x uint64) [8]byte
- func UnwrapIp(ipstr string) string
- func WrapIp(ipstr string) string
- type ResultInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bytes2Hexstring ¶
字节切片转为16进制表示字符串 区别与%x,不忽略前面的0,全部打印
func CompareNoCaseString ¶
func Hexstring2Bytes ¶
region 16进制字符串转换
16进制的字符串转换为字节切片 区别标准库,自动忽略字符串中的0-9 a-f A-F之外的其他字符 " 1t2y2u\r\n3a4b"也可以
func Time2Timestr ¶
region 时间转换 time 转时间字符串 * 常用时间格式化字符串 2006-01-02 15:03:04 2022-02-22 20:07:16
2006-01-02 15:03:04.999999 2022-02-22 20:07:16.6654375 2006-01-02 15:04:05.999999 Z0700 MST 2022-02-22 20:07:16.6654375 +0800 CST
func Timestr2Time ¶
时间字符串转时间 timestr 本地时间.如果失败,返回1970年开始时间,时间值=0
Types ¶
type ResultInfo ¶
Click to show internal directories.
Click to hide internal directories.