wizutil

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsHexNumber

func IsHexNumber(b byte) bool

IsNumber tests if a byte is in [0-9A-Za-z]

func IsLowerLetter

func IsLowerLetter(b byte) bool

IsLowerLetter tests if a byte is in [a-z]

func IsNumber

func IsNumber(b byte) bool

IsNumber tests if a byte is in [0-9]

func IsOctalNumber

func IsOctalNumber(b byte) bool

IsNumber tests if a byte is in [0-7]

func IsUpperLetter

func IsUpperLetter(b byte) bool

IsUpperLetter tests if a byte is in [A-Z]

func IsWhitespace

func IsWhitespace(b byte) bool

IsWhitespace tests if a byte is either a space or a tab

func MergeStrings

func MergeStrings(outStrings []string) string

MergeStrings concatenates a set of strings return by Identify into a string that file(1) would print. For example, it handles \b.

func ToLower

func ToLower(b byte) byte

ToLower transliterates from [A-Z] to [a-z], other bytes are unchanged

func ToUpper

func ToUpper(b byte) byte

ToUpper transliterates from [a-z] to [A-Z], other bytes are unchanged

Types

type ByteView

type ByteView struct {
	Input    *SliceReader
	LookBack int64
	// contains filtered or unexported fields
}

ByteView allows treating an io.ReaderAt as a byte array.

func (*ByteView) Get

func (bv *ByteView) Get(i int64) int

Get returns the byte at index i, or -1 if we failed to read

type SliceReader

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

func NewSliceReader

func NewSliceReader(reader io.ReaderAt, offset int64, size int64) *SliceReader

func (*SliceReader) AbsoluteOffset

func (sr *SliceReader) AbsoluteOffset() int64

func (*SliceReader) AbsoluteSize

func (sr *SliceReader) AbsoluteSize() int64

func (*SliceReader) Cap

func (sr *SliceReader) Cap(size int64) *SliceReader

func (*SliceReader) ReadAt

func (sr *SliceReader) ReadAt(buf []byte, index int64) (int, error)

func (*SliceReader) Size

func (sr *SliceReader) Size() int64

func (*SliceReader) Slice

func (sr *SliceReader) Slice(offset int64) *SliceReader

Jump to

Keyboard shortcuts

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