internal

package
v1.22.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BaseUnit unitHandler = defaultBaseUnit
)

Functions

func Bytes2HexString

func Bytes2HexString(b []byte) string

Bytes2HexString bytes转16进制字符串

func DecodeBig5

func DecodeBig5(s []byte) ([]byte, error)

DecodeBig5 convert BIG5 to UTF-8

func DecodeGBK

func DecodeGBK(s []byte) ([]byte, error)

DecodeGBK convert GBK to UTF-8

func DecodeVarint

func DecodeVarint(b []byte, pos *int) int

DecodeVarint pytdx : 类似utf-8的编码方式保存有符号数字

func EncodeBig5

func EncodeBig5(s []byte) ([]byte, error)

EncodeBig5 convert UTF-8 to BIG5

func EncodeGBK

func EncodeGBK(s []byte) ([]byte, error)

EncodeGBK convert UTF-8 to GBK

func Float64IsNaN

func Float64IsNaN(f float64) bool

Float64IsNaN 判断float64是否NaN

func GetDatetime

func GetDatetime(category int, b []byte, pos *int) (year int, month int, day int, hour int, minute int)

func GetDatetimeFromUint32

func GetDatetimeFromUint32(category int, zipday uint32, tminutes uint16) (year int, month int, day int, hour int, minute int)

func GetTime

func GetTime(b []byte, pos *int) (h uint16, m uint16)

func HexString2Bytes

func HexString2Bytes(hexStr string) []byte

HexString2Bytes 16进制字符串转bytes

func IntToFloat64

func IntToFloat64[T ~uint32 | ~int | ~int64](integer T) float64

IntToFloat64 整型转float64

func NumberToFloat64

func NumberToFloat64[T uint16 | uint32 | float32](v T) float64

func RegisterBaseUnitFunction added in v1.19.5

func RegisterBaseUnitFunction(f unitHandler)

func SequenceId added in v1.20.3

func SequenceId() uint32

SequenceId 生成序列号

func TimeFromInt

func TimeFromInt(stamp int) string

func Utf8ToGbk

func Utf8ToGbk(text []byte) string

func ZlibCompress

func ZlibCompress(src []byte) ([]byte, error)

ZlibCompress 进行zlib压缩

func ZlibUnCompress

func ZlibUnCompress(compressSrc []byte) ([]byte, error)

ZlibUnCompress 进行zlib解压缩

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL