# Packages
Package file provides simple utility functions to be used with files.
# Functions
No description provided by the author
No description provided by the author
Bytes2Hex returns the hexadecimal encoding of d.
Contain 判断obj是否在target中,target支持的类型arrary,slice,map.
CopyBytes returns an exact copy of the provided bytes.
No description provided by the author
FromHex returns the bytes represented by the hexadecimal string s.
Hex2Bytes returns the bytes represented by the hexadecimal string str.
Hex2BytesFixed returns bytes of a specified fixed length flen.
No description provided by the author
检验是否为合法的中国手机号, 不是那么太精细 只要是 13,14,15,18 开头的 11 位数字就认为是中国手机号.
同 func IsChinaMobile(b []byte) bool.
检验是否为合法的电子邮箱, 考虑到各个网站的 mail 要求不一样, 这里匹配比较宽松 邮箱用户名可以包含 0-9, A-Z, a-z, -, _, .
同 func IsMail(b []byte) bool.
检验是否为合法的昵称, 合法的字符有 0-9, A-Z, a-z, _, 汉字 字符 '_' 只能出现在中间且不能重复, 如 "__".
同 func IsNickname(b []byte) bool.
IsNumber 是否整数值.
同 func IsNumber(b []byte) bool.
IsRealNumber 是否实数值.
同 func IsRealNumber(b []byte) bool.
检验是否为合法的用户名, 合法的字符有 0-9, A-Z, a-z, _ 第一个字母不能为 _, 0-9 最后一个字母不能为 _, 且 _ 不能连续.
同 func IsName(b []byte) bool.
LeftPadBytes zero-pads slice to the left up to length l.
NewString 初始化字符串,自动转型.
NewStringByBool 通过bool初始化字符串.
NewStringByFloat 通过float初始化字符串.
NewStringByInt 通过int初始化字符串.
NewStringByUInt 通过int初始化字符串.
RightPadBytes zero-pads slice to the right up to length l.
No description provided by the author
No description provided by the author
No description provided by the author
timeFormat 格式化时间@param format 在go中,为2006-01-02 15:04:05.
ToHex returns the hex representation of b, prefixed with '0x'.
ToHexArray creates a array of hex-string based on []byte.
No description provided by the author
No description provided by the author
# Constants
NilString 定义空串的关键字.
# Interfaces
FloatProtocal 强化float的扩展方法.
IntProtocal 强化int的扩展方法.
StringProtocal 强化String的扩展方法.