Documentation
¶
Overview ¶
Package bytes is a bytes extended libary.
Index ¶
- func Replace(b []byte, src, dest []byte, n int) []byte
- func ReplaceAt(b []byte, off, nsrc int, dest []byte) []byte
- func ReplaceOne(b []byte, from int, src, dest []byte) ([]byte, int)
- type Buffer
- func (p *Buffer) Buffer() []byte
- func (p *Buffer) Len() int
- func (p *Buffer) ReadAt(buf []byte, off int64) (n int, err error)
- func (p *Buffer) Truncate(fsize int64) (err error)
- func (p *Buffer) WriteAt(buf []byte, off int64) (n int, err error)
- func (p *Buffer) WriteStringAt(buf string, off int64) (n int, err error)
- type Reader
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Unlike the standard library's bytes.Reader, this Reader supports Seek.
func NewReader ¶
NewReader create a readonly stream for byte slice:
var slice []byte ... r := bytes.NewReader(slice) ... r.Seek(0, 0) // r.SeekToBegin() ...
Unlike the standard library's bytes.Reader, the returned Reader supports Seek.
func (*Reader) SeekToBegin ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer implements a write stream with a limited capacity.
Click to show internal directories.
Click to hide internal directories.