Documentation
¶
Index ¶
- Constants
- Variables
- func AppendRepeat[S ~[]E, E any, I Integer](s S, n I, e E) []E
- func AppendUnique[S ~[]E, E comparable](s S, e ...E) S
- func AppendUniqueFunc[S ~[]E, E comparable](s S, cmp func(E) bool, e ...E) S
- func BytesEqualString(b []byte, s string) bool
- func Combinate[E any](m int, items ...E) iter.Seq[[]E]
- func CountDigits(u uint64) uint64
- func CountFunc[S ~[]E, E any](s S, f func(E) bool) (res uint64)
- func DoEachByteFile(filename string, tFunc TransformRowFunc) (err error)
- func DoEachRowBuff(r *bufio.Reader, f RowFunc, extra ...RowFunc) (err error)
- func DoEachRowBuffN(r *bufio.Reader, n int, f MultiRowFunc, extra ...MultiRowFunc) (err error)
- func DoEachRowFile(filename string, rowFunc RowFunc, extra ...RowFunc) (err error)
- func DoEachRowFileN(filename string, n int, rowFunc MultiRowFunc, extra ...MultiRowFunc) (err error)
- func DoFile(filename string, execFunc ExecFunc, rowFunc RowFunc, extra ...RowFunc) (err error)
- func DoFileN(filename string, n int, execFunc MultiExecFunc, rowFunc MultiRowFunc, ...) (err error)
- func FileExists(filePath string) (exists bool, err error)
- func GetYearDay(args []string) (year string, days []string, err error)
- func GetYearDays(args []string) (year string, days []string, err error)
- func Identity[T any](t T) T
- func LenUnique[S ~[]E, E comparable](s S) (res int)
- func ParseInt[T Signed](arr []byte) (res T)
- func ParseInt64(arr []byte) (res int64, err error)
- func ParseInt64ArrNoError(arr []byte) (res []int64)
- func ParseInt64ArrNoErrorCache(arr []byte, input []int64) (res []int64)
- func ParseInt64NoError(arr []byte) (res int64)
- func ParseIntArr[T Signed](arr []byte) (res []T)
- func ParseUint[U Unsigned](arr []byte) (res U)
- func ParseUint64ArrNoError(arr []byte) (res []uint64)
- func ParseUint64NoError(arr []byte) (res uint64)
- func ParseUintArr[U Unsigned](arr []byte) (res []U)
- func PowerInt(x, y int) int
- func PowerInt64(x, y int64) int64
- func PtrToUnsafeString(s *[]byte) string
- func Repeat[I Integer, E any](n I, e E) []E
- func Seq2ToChannel[K comparable, V any](s iter.Seq2[K, V], buffer int) (*sync.WaitGroup, <-chan V)
- func SeqToChannel[V any](s iter.Seq[V], buffer int) (*sync.WaitGroup, <-chan V)
- func SliceToChannel[S ~[]V, V any](s S, buffer int) (*sync.WaitGroup, <-chan V)
- func ToKeysSeq2[S ~[]K, K comparable, V any](s S, v V) iter.Seq2[K, V]
- func ToUnsafeString(s []byte) string
- func Unique[S ~[]E, E comparable](s S) (res S)
- type Coordinate
- type Coordinater
- type ExecFunc
- type Integer
- type MultiExecFunc
- type MultiRowFunc
- type PatternFunc
- type Patterner
- type Pos
- type PositionMap
- type RowFunc
- type Signed
- type StringPattern
- type Tokenizer
- type TransformRowFunc
- type Unsigned
- type UnsignedPos
Constants ¶
View Source
const (
ErrPatternIsNull errorsx.SimpleError = "pattern cannot be null"
)
Variables ¶
View Source
var ( ErrUnsupportedPositionType errorsx.SimpleError = "type is not supported" ErrInsufficientSpace errorsx.SimpleError = "buffer is to small to read a row, try increasing it" )
View Source
var ( IsNumber = [256]uint8{'0': 1, '1': 1, '2': 1, '3': 1, '4': 1, '5': 1, '6': 1, '7': 1, '8': 1, '9': 1} IsLetter = [256]uint8{'A': 1, 'B': 1, 'C': 1, 'D': 1, 'E': 1, 'F': 1, 'G': 1, 'H': 1, 'I': 1, 'J': 1, 'K': 1, 'L': 1, 'M': 1, 'N': 1, 'O': 1, 'P': 1, 'Q': 1, 'R': 1, 'S': 1, 'T': 1, 'U': 1, 'V': 1, 'W': 1, 'X': 1, 'Y': 1, 'Z': 1, 'a': 1, 'b': 1, 'c': 1, 'd': 1, 'e': 1, 'f': 1, 'g': 1, 'h': 1, 'i': 1, 'j': 1, 'k': 1, 'l': 1, 'm': 1, 'n': 1, 'o': 1, 'p': 1, 'q': 1, 'r': 1, 's': 1, 't': 1, 'u': 1, 'v': 1, 'w': 1, 'x': 1, 'y': 1, 'z': 1} IsUpperLetter = [256]uint8{'A': 1, 'B': 1, 'C': 1, 'D': 1, 'E': 1, 'F': 1, 'G': 1, 'H': 1, 'I': 1, 'J': 1, 'K': 1, 'L': 1, 'M': 1, 'N': 1, 'O': 1, 'P': 1, 'Q': 1, 'R': 1, 'S': 1, 'T': 1, 'U': 1, 'V': 1, 'W': 1, 'X': 1, 'Y': 1, 'Z': 1} IsLowerLetter = [256]uint8{'a': 1, 'b': 1, 'c': 1, 'd': 1, 'e': 1, 'f': 1, 'g': 1, 'h': 1, 'i': 1, 'j': 1, 'k': 1, 'l': 1, 'm': 1, 'n': 1, 'o': 1, 'p': 1, 'q': 1, 'r': 1, 's': 1, 't': 1, 'u': 1, 'v': 1, 'w': 1, 'x': 1, 'y': 1, 'z': 1} IsAlphaNumerical = [256]uint8{'0': 1, '1': 1, '2': 1, '3': 1, '4': 1, '5': 1, '6': 1, '7': 1, '8': 1, '9': 1, 'A': 1, 'B': 1, 'C': 1, 'D': 1, 'E': 1, 'F': 1, 'G': 1, 'H': 1, 'I': 1, 'J': 1, 'K': 1, 'L': 1, 'M': 1, 'N': 1, 'O': 1, 'P': 1, 'Q': 1, 'R': 1, 'S': 1, 'T': 1, 'U': 1, 'V': 1, 'W': 1, 'X': 1, 'Y': 1, 'Z': 1, 'a': 1, 'b': 1, 'c': 1, 'd': 1, 'e': 1, 'f': 1, 'g': 1, 'h': 1, 'i': 1, 'j': 1, 'k': 1, 'l': 1, 'm': 1, 'n': 1, 'o': 1, 'p': 1, 'q': 1, 'r': 1, 's': 1, 't': 1, 'u': 1, 'v': 1, 'w': 1, 'x': 1, 'y': 1, 'z': 1} )
View Source
var AsciiSpace = [256]uint8{'\t': 1, '\n': 1, '\v': 1, '\f': 1, '\r': 1, ' ': 1}
Functions ¶
func AppendRepeat ¶
func AppendUnique ¶
func AppendUnique[S ~[]E, E comparable](s S, e ...E) S
func AppendUniqueFunc ¶
func AppendUniqueFunc[S ~[]E, E comparable](s S, cmp func(E) bool, e ...E) S
func BytesEqualString ¶
func CountDigits ¶
func DoEachByteFile ¶
func DoEachByteFile(filename string, tFunc TransformRowFunc) (err error)
func DoEachRowBuffN ¶
func DoEachRowBuffN(r *bufio.Reader, n int, f MultiRowFunc, extra ...MultiRowFunc) (err error)
func DoEachRowFile ¶
func DoEachRowFileN ¶
func DoEachRowFileN(filename string, n int, rowFunc MultiRowFunc, extra ...MultiRowFunc) (err error)
func DoFileN ¶
func DoFileN(filename string, n int, execFunc MultiExecFunc, rowFunc MultiRowFunc, extra ...MultiRowFunc) (err error)
func FileExists ¶
func LenUnique ¶
func LenUnique[S ~[]E, E comparable](s S) (res int)
func ParseInt64 ¶
func ParseInt64ArrNoError ¶
func ParseInt64NoError ¶
func ParseIntArr ¶
func ParseUint64ArrNoError ¶
func ParseUint64NoError ¶
func ParseUintArr ¶
func PowerInt64 ¶
func PtrToUnsafeString ¶
func Seq2ToChannel ¶
func SliceToChannel ¶
func ToKeysSeq2 ¶
func ToKeysSeq2[S ~[]K, K comparable, V any](s S, v V) iter.Seq2[K, V]
func ToUnsafeString ¶
func Unique ¶
func Unique[S ~[]E, E comparable](s S) (res S)
Types ¶
type Coordinate ¶
type Coordinater ¶
type Coordinater[C Coordinate] interface { Y() C X() C }
type MultiExecFunc ¶
type MultiExecFunc func(*bufio.Reader, int, MultiRowFunc, ...MultiRowFunc) error
type MultiRowFunc ¶
type PatternFunc ¶
type PositionMap ¶
type PositionMap[P Pos[U], U UnsignedPos, T any] struct { Map []T Positions []U MaxPos U }
func ToMapOfPositions ¶
func ToMapOfPositions[P Pos[U], U UnsignedPos, V any](filename string, transform func(byte) V, extra ...RowFunc) (posMap PositionMap[P, U, V], err error)
func ToMapOfPositionsByte ¶
func ToMapOfPositionsByte[P Pos[U], U UnsignedPos](filename string, extra ...RowFunc) (posMap PositionMap[P, U, byte], err error)
func (PositionMap[P, E, T]) Contains ¶
func (p PositionMap[P, E, T]) Contains(pos E) bool
func (PositionMap[P, E, T]) HasInside ¶
func (p PositionMap[P, E, T]) HasInside(pos P) bool
func (PositionMap[P, E, T]) MapString ¶
func (p PositionMap[P, E, T]) MapString() string
func (PositionMap[P, E, T]) String ¶
func (p PositionMap[P, E, T]) String() string
type StringPattern ¶
type StringPattern string
func (StringPattern) Pattern ¶
func (s StringPattern) Pattern(p []byte) bool
type TransformRowFunc ¶
type TransformRowFunc func(b byte)
type UnsignedPos ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.