Documentation ¶
Index ¶
- func AbsDiffInt[T constraints.Integer](x, y T) T
- func AbsInt[T constraints.Signed](x T) T
- func Atoi(s string) int
- func ClampInt(i, min, max int) int
- func MakeMatrix2D[E any](ydim, xdim int) [][]E
- func MaxFloat[T constraints.Float](a, b T) T
- func MaxInteger[T constraints.Integer](a, b T) T
- func MaybePanic(err error)
- func MinFloat[T constraints.Float](a, b T) T
- func MinInteger[T constraints.Integer](a, b T) T
- func MustConsume(s, prefix string) string
- func MustCut(s string, sep string) (before, after string)
- func ParseCommaSeparatedInt(s string) []int
- func ParseIntegers(b []byte) []int
- func ScanSections(data []byte, atEOF bool) (advance int, token []byte, err error)
- func SplitExact(s string, sep string, n int) []string
- func SplitLines(b []byte) [][]byte
- func SplitSections(b []byte) [][]byte
- func TestPart(t *testing.T, part func(string) string, cases []TestCase)
- type TestCase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbsDiffInt ¶
func AbsDiffInt[T constraints.Integer](x, y T) T
func AbsInt ¶
func AbsInt[T constraints.Signed](x T) T
func MakeMatrix2D ¶
func MaxFloat ¶
func MaxFloat[T constraints.Float](a, b T) T
func MaxInteger ¶
func MaxInteger[T constraints.Integer](a, b T) T
func MaybePanic ¶
func MaybePanic(err error)
func MinFloat ¶
func MinFloat[T constraints.Float](a, b T) T
func MinInteger ¶
func MinInteger[T constraints.Integer](a, b T) T
func MustConsume ¶
func ParseCommaSeparatedInt ¶
func ParseIntegers ¶
func ScanSections ¶
ScanSections is a split function for a bufio.Scanner that returns sections separated by multiple newlines, stripped of any consecutive newlines. The returned section may be empty.
func SplitLines ¶
func SplitSections ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.