Documentation ¶
Index ¶
- Variables
- func BaseConvert(number string, frombase, tobase int) string
- func Bindec(str string) int64
- func Decbin(number int64) string
- func Dechex(number int64) string
- func Decoct(number int64) string
- func Hexdec(str string) int64
- func Octdec(str string) int64
- type DataName
- type DataSet
- func (this *DataSet[N, M]) Add(name N, data func() M) *DataSet[N, M]
- func (this *DataSet[N, M]) All() map[N]func() M
- func (this *DataSet[N, M]) Clean()
- func (this *DataSet[N, M]) Get(name N) func() M
- func (this *DataSet[N, M]) Has(name N) bool
- func (this *DataSet[N, M]) Len() int
- func (this *DataSet[N, M]) Names() []N
- func (this *DataSet[N, M]) Remove(name N) *DataSet[N, M]
- type Encoding
- func (this Encoding) Asn1Decode(val any) Encoding
- func (this Encoding) Asn1DecodeWithParams(val any, params string) Encoding
- func (this Encoding) Asn1Encode(data any) Encoding
- func (this Encoding) Asn1EncodeWithParams(data any, params string) Encoding
- func (this Encoding) Base100Decode() Encoding
- func (this Encoding) Base100Encode() Encoding
- func (this Encoding) Base32Decode() Encoding
- func (this Encoding) Base32DecodeWithEncoder(encoder string) Encoding
- func (this Encoding) Base32Encode() Encoding
- func (this Encoding) Base32EncodeWithEncoder(encoder string) Encoding
- func (this Encoding) Base32HexDecode() Encoding
- func (this Encoding) Base32HexEncode() Encoding
- func (this Encoding) Base32RawDecode() Encoding
- func (this Encoding) Base32RawDecodeWithEncoder(encoder string) Encoding
- func (this Encoding) Base32RawEncode() Encoding
- func (this Encoding) Base32RawEncodeWithEncoder(encoder string) Encoding
- func (this Encoding) Base32RawHexDecode() Encoding
- func (this Encoding) Base32RawHexEncode() Encoding
- func (this Encoding) Base45Decode() Encoding
- func (this Encoding) Base45Encode() Encoding
- func (this Encoding) Base58Decode() Encoding
- func (this Encoding) Base58Encode() Encoding
- func (this Encoding) Base62Decode() Encoding
- func (this Encoding) Base62Encode() Encoding
- func (this Encoding) Base64Decode() Encoding
- func (this Encoding) Base64DecodeWithEncoder(encoder string) Encoding
- func (this Encoding) Base64Encode() Encoding
- func (this Encoding) Base64EncodeWithEncoder(encoder string) Encoding
- func (this Encoding) Base64RawDecode() Encoding
- func (this Encoding) Base64RawEncode() Encoding
- func (this Encoding) Base64RawURLDecode() Encoding
- func (this Encoding) Base64RawURLEncode() Encoding
- func (this Encoding) Base64SegmentDecode(paddingAllowed ...bool) Encoding
- func (this Encoding) Base64SegmentEncode() Encoding
- func (this Encoding) Base64URLDecode() Encoding
- func (this Encoding) Base64URLEncode() Encoding
- func (this Encoding) Base85Decode() Encoding
- func (this Encoding) Base85Encode() Encoding
- func (this Encoding) Base91Decode() Encoding
- func (this Encoding) Base91Encode() Encoding
- func (this Encoding) Basex16Decode() Encoding
- func (this Encoding) Basex16Encode() Encoding
- func (this Encoding) Basex2Decode() Encoding
- func (this Encoding) Basex2Encode() Encoding
- func (this Encoding) Basex62Decode() Encoding
- func (this Encoding) Basex62Encode() Encoding
- func (this Encoding) BasexDecodeWithEncoder(encoder string) Encoding
- func (this Encoding) BasexEncodeWithEncoder(encoder string) Encoding
- func (this Encoding) BinaryBigEndianDecode(dst any) Encoding
- func (this Encoding) BinaryBigEndianEncode(data any) Encoding
- func (this Encoding) BinaryLittleEndianDecode(dst any) Encoding
- func (this Encoding) BinaryLittleEndianEncode(data any) Encoding
- func (this Encoding) ConvertBinDecode(data string) Encoding
- func (this Encoding) ConvertBinEncode() string
- func (this Encoding) ConvertDecDecode(data int64) Encoding
- func (this Encoding) ConvertDecEncode() int64
- func (this Encoding) ConvertDecStringDecode(data string) Encoding
- func (this Encoding) ConvertDecStringEncode() string
- func (this Encoding) ConvertDecode(input any, base int, bitSize ...int) Encoding
- func (this Encoding) ConvertEncode(base int) string
- func (this Encoding) ConvertHexDecode(data string) Encoding
- func (this Encoding) ConvertHexEncode() string
- func (this Encoding) ConvertOctDecode(data string) Encoding
- func (this Encoding) ConvertOctEncode() string
- func (this Encoding) CsvDecode(dst any, opts ...rune) Encoding
- func (this Encoding) CsvEncode(data [][]string) Encoding
- func (this Encoding) DecodeBy(name string, cfg ...map[string]any) Encoding
- func (this Encoding) EncodeBy(name string, cfg ...map[string]any) Encoding
- func (this Encoding) FromBytes(data []byte) Encoding
- func (this Encoding) FromReader(reader io.Reader) Encoding
- func (this Encoding) FromString(data string) Encoding
- func (this Encoding) GobDecode(dst any) Encoding
- func (this Encoding) GobEncode(data any) Encoding
- func (this Encoding) HexDecode() Encoding
- func (this Encoding) HexEncode() Encoding
- func (this Encoding) JSONDecode(dst any) Encoding
- func (this Encoding) JSONEncode(data any) Encoding
- func (this Encoding) JSONIteratorDecode(dst any) Encoding
- func (this Encoding) JSONIteratorEncode(data any) Encoding
- func (this Encoding) JSONIteratorIndentEncode(v any, prefix, indent string) Encoding
- func (this Encoding) MorseITUDecode() Encoding
- func (this Encoding) MorseITUEncode() Encoding
- func (this Encoding) PunyDecode() Encoding
- func (this Encoding) PunyEncode() Encoding
- func (this Encoding) QuotedprintableDecode() Encoding
- func (this Encoding) QuotedprintableEncode() Encoding
- func (this Encoding) SafeURLDecode() Encoding
- func (this Encoding) SafeURLEncode() Encoding
- func (this Encoding) SerializeDecode(val any) Encoding
- func (this Encoding) SerializeEncode(data any) Encoding
- func (this Encoding) String() string
- func (this Encoding) ToBytes() []byte
- func (this Encoding) ToReader() io.Reader
- func (this Encoding) ToString() string
- func (this Encoding) XmlDecode(dst any) Encoding
- func (this Encoding) XmlEncode(data any) Encoding
- type IEncoding
Constants ¶
This section is empty.
Variables ¶
var ( // 自定义编码表 // newStr := NewBase32Encoding(encoder string).WithPadding(NoPadding).EncodeToString(src []byte) // newStr, err := NewBase32Encoding(encoder string).WithPadding(NoPadding).DecodeString(src string) NewBase32Encoding = base32.NewEncoding )
var ( // 自定义编码表 // newStr := NewBase64Encoding(encoder string).WithPadding(NoPadding).EncodeToString(src []byte) // newStr, err := NewBase64Encoding(encoder string).WithPadding(NoPadding).DecodeString(src string) NewBase64Encoding = base64.NewEncoding )
var UseEncoding = NewDataSet[string, IEncoding]()
编码解码
Functions ¶
func BaseConvert ¶ added in v1.0.1003
各种进制互转 十进制转十六进制 BaseConvert("12312", 10, 16) [2- 36] 进制
Types ¶
type DataSet ¶ added in v1.0.2003
*
- 数据设置 *
- @create 2023-3-31
- @author deatil
type Encoding ¶ added in v1.0.2
type Encoding struct { // 错误 Error error // contains filtered or unexported fields }
*
- 编码 *
- @create 2022-4-3
- @author deatil
func (Encoding) Asn1Decode ¶ added in v1.0.2001
Asn1 解码
func (Encoding) Asn1DecodeWithParams ¶ added in v1.0.2001
Asn1 解码
func (Encoding) Asn1Encode ¶ added in v1.0.2001
Asn1 编码
func (Encoding) Asn1EncodeWithParams ¶ added in v1.0.2001
Asn1 编码
func (Encoding) Base100Decode ¶ added in v1.0.2001
Base100
func (Encoding) Base100Encode ¶ added in v1.0.2001
编码 Base100
func (Encoding) Base32Decode ¶ added in v1.0.2001
解码 Base32
func (Encoding) Base32DecodeWithEncoder ¶ added in v1.0.2001
解码 Base32Encoder
func (Encoding) Base32Encode ¶ added in v1.0.2001
编码 Base32
func (Encoding) Base32EncodeWithEncoder ¶ added in v1.0.2001
编码 Base32Encoder
func (Encoding) Base32HexDecode ¶ added in v1.0.2001
解码 Base32Hex
func (Encoding) Base32HexEncode ¶ added in v1.0.2001
编码 Base32Hex
func (Encoding) Base32RawDecode ¶ added in v1.0.2005
解码 Base32, 不补位
func (Encoding) Base32RawDecodeWithEncoder ¶ added in v1.0.2005
解码 Base32Encoder, 不补位
func (Encoding) Base32RawEncode ¶ added in v1.0.2005
编码 Base32, 不补位
func (Encoding) Base32RawEncodeWithEncoder ¶ added in v1.0.2005
编码 Base32Encoder, 不补位
func (Encoding) Base32RawHexDecode ¶ added in v1.0.2005
解码 Base32Hex, 不补位
func (Encoding) Base32RawHexEncode ¶ added in v1.0.2005
编码 Base32Hex, 不补位
func (Encoding) Base45Decode ¶ added in v1.0.2001
Base45
func (Encoding) Base45Encode ¶ added in v1.0.2001
编码 Base45
func (Encoding) Base58Decode ¶ added in v1.0.2001
Base58
func (Encoding) Base58Encode ¶ added in v1.0.2001
编码 Base58
func (Encoding) Base62Decode ¶ added in v1.0.2001
Base62
func (Encoding) Base62Encode ¶ added in v1.0.2001
编码 Base62
func (Encoding) Base64Decode ¶ added in v1.0.2001
Base64
func (Encoding) Base64DecodeWithEncoder ¶ added in v1.0.2001
Base64DecodeWithEncoder
func (Encoding) Base64Encode ¶ added in v1.0.2001
编码 Base64
func (Encoding) Base64EncodeWithEncoder ¶ added in v1.0.2001
编码 Base64Encoder
func (Encoding) Base64RawDecode ¶ added in v1.0.2001
Base64Raw
func (Encoding) Base64RawEncode ¶ added in v1.0.2001
编码 Base64Raw
func (Encoding) Base64RawURLDecode ¶ added in v1.0.2001
Base64RawURL
func (Encoding) Base64RawURLEncode ¶ added in v1.0.2001
编码 Base64RawURL
func (Encoding) Base64SegmentDecode ¶ added in v1.0.2001
Base64Segment
func (Encoding) Base64SegmentEncode ¶ added in v1.0.2001
编码 Base64Segment
func (Encoding) Base64URLDecode ¶ added in v1.0.2001
Base64URL
func (Encoding) Base64URLEncode ¶ added in v1.0.2001
编码 Base64URL
func (Encoding) Base85Decode ¶ added in v1.0.2001
Base85
func (Encoding) Base85Encode ¶ added in v1.0.2001
编码 Base85
func (Encoding) Base91Decode ¶ added in v1.0.2001
Base91
func (Encoding) Base91Encode ¶ added in v1.0.2001
编码 Base91
func (Encoding) Basex16Decode ¶ added in v1.0.2001
Basex16
func (Encoding) Basex16Encode ¶ added in v1.0.2001
编码 Base16
func (Encoding) Basex2Decode ¶ added in v1.0.2001
Basex2
func (Encoding) Basex2Encode ¶ added in v1.0.2001
编码 Base2
func (Encoding) Basex62Decode ¶ added in v1.0.2001
Basex62
func (Encoding) Basex62Encode ¶ added in v1.0.2001
编码 Basex62
func (Encoding) BasexDecodeWithEncoder ¶ added in v1.0.2001
BasexDecodeWithEncoder
func (Encoding) BasexEncodeWithEncoder ¶ added in v1.0.2001
BasexEncodeWithEncoder
func (Encoding) BinaryBigEndianDecode ¶ added in v1.0.2001
Binary 大端加码
func (Encoding) BinaryBigEndianEncode ¶ added in v1.0.2001
Binary 大端编码
func (Encoding) BinaryLittleEndianDecode ¶ added in v1.0.2001
Binary 小端解码
func (Encoding) BinaryLittleEndianEncode ¶ added in v1.0.2001
Binary 小端编码
func (Encoding) ConvertBinDecode ¶ added in v1.0.2001
二进制
func (Encoding) ConvertBinEncode ¶ added in v1.0.2001
输出 二进制
func (Encoding) ConvertDecDecode ¶ added in v1.0.2001
十进制
func (Encoding) ConvertDecEncode ¶ added in v1.0.2001
输出 十进制
func (Encoding) ConvertDecStringDecode ¶ added in v1.0.2001
十进制字符
func (Encoding) ConvertDecStringEncode ¶ added in v1.0.2001
输出 十进制
func (Encoding) ConvertDecode ¶ added in v1.0.2001
给定类型数据格式化为string类型数据 bitSize 限制长度 ParseBool()、ParseFloat()、ParseInt()、ParseUint()。 FormatBool()、FormatInt()、FormatUint()、FormatFloat()、
func (Encoding) ConvertEncode ¶ added in v1.0.2001
输出进制编码
func (Encoding) ConvertHexDecode ¶ added in v1.0.2001
十六进制
func (Encoding) ConvertHexEncode ¶ added in v1.0.2001
输出 十六进制
func (Encoding) ConvertOctDecode ¶ added in v1.0.2001
八进制
func (Encoding) ConvertOctEncode ¶ added in v1.0.2001
输出 八进制
func (Encoding) FromReader ¶ added in v1.0.2001
FromReader
func (Encoding) FromString ¶ added in v1.0.2
字符
func (Encoding) JSONDecode ¶ added in v1.0.2001
JSON 编码输出
func (Encoding) JSONEncode ¶ added in v1.0.2001
JSON
func (Encoding) JSONIteratorDecode ¶ added in v1.0.2001
JSON 编码输出
func (Encoding) JSONIteratorEncode ¶ added in v1.0.2001
JSON
func (Encoding) JSONIteratorIndentEncode ¶ added in v1.0.2001
JSON
func (Encoding) MorseITUDecode ¶ added in v1.0.2001
MorseITU
func (Encoding) MorseITUEncode ¶ added in v1.0.2001
编码 MorseITU
func (Encoding) PunyDecode ¶ added in v1.0.2006
PunyDecode
func (Encoding) QuotedprintableDecode ¶ added in v1.0.2006
解码 quotedprintable
func (Encoding) QuotedprintableEncode ¶ added in v1.0.2006
编码 quotedprintable
func (Encoding) SafeURLDecode ¶ added in v1.0.2001
对 URL 进行转义解码
func (Encoding) SafeURLEncode ¶ added in v1.0.2001
对 URL 进行转义编码
func (Encoding) SerializeDecode ¶ added in v1.0.2001
序列化输出
func (Encoding) SerializeEncode ¶ added in v1.0.2001
序列化