utils

package
v0.0.0-...-440800f Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dump

func Dump(buf []byte) string

func DumpSize

func DumpSize(size int, buf []byte) string

func HexDump

func HexDump(buf []byte) string

func HexDumpSize

func HexDumpSize(size int, buf []byte) string

func Int32Intersect

func Int32Intersect(nums1 Int32Slice, nums2 Int32Slice) []int32

func Int64Intersect

func Int64Intersect(nums1 Int64Slice, nums2 Int64Slice) []int64

func IsAlNum

func IsAlNum(c byte) bool

IsAlNum check character is a alnum or not

func IsLetter

func IsLetter(b byte) bool

IsLetter check character is a letter or not

func IsLower

func IsLower(b byte) bool

IsLower check letter is lower case or not

func IsNumber

func IsNumber(c byte) bool

IsNumber check character is a number or not

func IsUpper

func IsUpper(b byte) bool

IsUpper check letter is upper case or not

func ReadBytes

func ReadBytes(dbuf *BufferInput) (b []byte, err error)

func ReadString

func ReadString(dbuf *BufferInput) (s string, err error)

func WriteBytes

func WriteBytes(x *BufferOutput, b []byte)

func WriteString

func WriteString(x *BufferOutput, s string)

Types

type BufferInput

type BufferInput struct {
	// contains filtered or unexported fields
}

func NewBufferInput

func NewBufferInput(buf []byte) *BufferInput

func (*BufferInput) Buf

func (m *BufferInput) Buf() ([]byte, error)

func (*BufferInput) Byte

func (m *BufferInput) Byte() byte

func (*BufferInput) Bytes

func (m *BufferInput) Bytes(size int) []byte

func (*BufferInput) Double

func (m *BufferInput) Double() float64

func (*BufferInput) Dump

func (m *BufferInput) Dump() string

func (*BufferInput) DumpSize

func (m *BufferInput) DumpSize(size int) string

func (*BufferInput) Error

func (m *BufferInput) Error() error

func (*BufferInput) Int16

func (m *BufferInput) Int16() int16

func (*BufferInput) Int32

func (m *BufferInput) Int32() int32

func (*BufferInput) Int64

func (m *BufferInput) Int64() int64

func (*BufferInput) UInt16

func (m *BufferInput) UInt16() uint16

func (*BufferInput) UInt32

func (m *BufferInput) UInt32() uint32

func (*BufferInput) UInt64

func (m *BufferInput) UInt64() uint64

type BufferOutput

type BufferOutput struct {
	// contains filtered or unexported fields
}

func NewBufferOutput

func NewBufferOutput(cap int) *BufferOutput

func (*BufferOutput) Buf

func (e *BufferOutput) Buf() []byte

func (*BufferOutput) Byte

func (e *BufferOutput) Byte(s byte)

func (*BufferOutput) ByteSize

func (e *BufferOutput) ByteSize() int

func (*BufferOutput) Bytes

func (e *BufferOutput) Bytes(s []byte)

func (*BufferOutput) Double

func (e *BufferOutput) Double(s float64)

func (*BufferOutput) Int16

func (e *BufferOutput) Int16(s int16)

func (*BufferOutput) Int32

func (e *BufferOutput) Int32(s int32)

func (*BufferOutput) Int64

func (e *BufferOutput) Int64(s int64)

func (*BufferOutput) Len

func (e *BufferOutput) Len() int

func (*BufferOutput) UInt16

func (e *BufferOutput) UInt16(s uint16)

func (*BufferOutput) UInt32

func (e *BufferOutput) UInt32(s uint32)

func (*BufferOutput) UInt64

func (e *BufferOutput) UInt64(s uint64)

type Int32Slice

type Int32Slice []int32

Int32Slice IntSlice attaches the methods of Interface to []int, sorting in increasing order.

func (Int32Slice) Len

func (p Int32Slice) Len() int

func (Int32Slice) Less

func (p Int32Slice) Less(i, j int) bool

func (Int32Slice) Swap

func (p Int32Slice) Swap(i, j int)

type Int64Slice

type Int64Slice []int64

Int64Slice IntSlice attaches the methods of Interface to []int, sorting in increasing order.

func (Int64Slice) Len

func (p Int64Slice) Len() int

func (Int64Slice) Less

func (p Int64Slice) Less(i, j int) bool

func (Int64Slice) Swap

func (p Int64Slice) Swap(i, j int)

Jump to

Keyboard shortcuts

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