bytesbuffer

package
Version: v0.0.0-...-ba7e8e4 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hex_to_str

func Hex_to_str(str string) (string, error)

func Str_to_hex

func Str_to_hex(str string, prefix string) string

Types

type BytesBuffer

type BytesBuffer struct {
	Buffer *bytes.Buffer
}

func NewBuffer

func NewBuffer(buf []byte) *BytesBuffer

func NewBufferString

func NewBufferString(s string) *BytesBuffer

func (*BytesBuffer) ByteString

func (this *BytesBuffer) ByteString(prefix string) string

1234 + prefix("%") -> %31%32%33%34 1234 + prefix("\x") -> \x31\x32\x33\x34 1234 + prefix("") -> 31323334

func (*BytesBuffer) WriteByteString

func (this *BytesBuffer) WriteByteString(byteStr string) error

\x31\x32\x33\x34 -> 1234 %31%32%33%34 -> 1234 31323334 -> 1234

func (*BytesBuffer) WriteToByteString

func (this *BytesBuffer) WriteToByteString(w io.Writer, prefix string) (n int64, err error)

Buffer will be empty after Write

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL