Documentation
¶
Index ¶
- type Buffer
- func (buffer *Buffer) Bytes() []byte
- func (buffer *Buffer) CopyTo(source []byte, destOffset int)
- func (buffer *Buffer) HexString() string
- func (buffer *Buffer) Paint(start int, length int, char byte)
- func (buffer *Buffer) RevCopyTo(source []byte, destOffset int)
- func (buffer *Buffer) Stdout(hex bool)
- func (buffer *Buffer) String() string
- func (buffer *Buffer) Stripe(start int, length int, stripeLength int)
- func (buffer *Buffer) SubStr(offset int, length int) string
- func (buffer *Buffer) Validate() error
- func (buffer *Buffer) WriteByteAt(offset int, char byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
func FromByteArray ¶ added in v0.1.13
FromByteArray creates a new buffer from a byte array
func (*Buffer) CopyTo ¶
CopyTo copies as much of source as possible onto destination at the specified offset
func (*Buffer) HexString ¶ added in v0.1.14
HexString writes data in hex string format to the stdout
func (*Buffer) Paint ¶
Paint will paint a character on the buffer from start position for length characters
func (*Buffer) RevCopyTo ¶
RevCopyTo copies as much of source as possible onto destination at the specified offset in reverse order
func (*Buffer) Stripe ¶
Stripe will draw a stripe pattern in the target buffer of a length of length bytes starting from start. The stripe length will be stripeLength which is half the diversity of the stripe. If the stripe length is 4 it will look like 0000111100001111
func (*Buffer) WriteByteAt ¶
WriteByteAt writes a byte at the specified position