nazuna

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

README

nazuna

Go Report Card GoDoc PRs Welcome

Nazuna is a micro-collection of Go functions to be used in junction with gana.

All functions are self-explanatory and are documented in the source code.

Named after Nazuna Nanakusa from the vibey series, Call of the Night.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEqual

func IsEqual[T comparable](anchor T) func(T) bool

IsEqual returns a function that returns true if the value is equal to the anchor value.

func IsGreater

func IsGreater[T constraints.Ordered](anchor T) func(T) bool

IsGreater returns a function that returns true if the value is greater than the anchor value.

func IsGreaterEqual

func IsGreaterEqual[T constraints.Ordered](anchor T) func(T) bool

IsGreaterEqual returns a function that returns true if the value is greater than or equal to the anchor value.

func IsLess

func IsLess[T constraints.Ordered](anchor T) func(T) bool

IsLess returns a function that returns true if the value is less than the anchor value.

func IsLessEqual

func IsLessEqual[T constraints.Ordered](anchor T) func(T) bool

IsLessEqual returns a function that returns true if the value is less than or equal to the anchor value.

func Nil

func Nil(v any) bool

Nil returns true if the value is nil.

func NotNil

func NotNil(v any) bool

NotNil returns true if the value is not nil.

func SliceContains

func SliceContains[T comparable](v T) func([]T) bool

SliceContains returns a function that returns true if the slice contains the value.

func SliceContainsAll

func SliceContainsAll[T comparable](vs []T) func([]T) bool

SliceContainsAll returns a function that returns true if the slice contains all of the values.

func SliceContainsAllRune

func SliceContainsAllRune(runes []rune) func([]rune) bool

SliceContainsAllRune returns a function that returns true if the slice contains all of the runes.

func SliceContainsAny

func SliceContainsAny[T comparable](vs []T) func([]T) bool

SliceContainsAny returns a function that returns true if the slice contains any of the values.

func SliceContainsAnyRune

func SliceContainsAnyRune(runes []rune) func([]rune) bool

SliceContainsAnyRune returns a function that returns true if the slice contains any of the runes.

func SliceContainsRune

func SliceContainsRune(r rune) func([]rune) bool

SliceContainsRune returns a function that returns true if the slice contains the rune.

func SliceEmpty

func SliceEmpty[T any](arr []T) bool

SliceEmpty returns true if the slice is empty.

func SliceNotEmpty

func SliceNotEmpty[T any](arr []T) bool

SliceNotEmpty returns true if the slice is not empty.

func StringContains

func StringContains(substr string) func(string) bool

StringContains returns a function that returns true if the string contains the substring.

func StringContainsAll

func StringContainsAll(substrs []string) func(string) bool

StringContainsAll returns a function that returns true if the string contains all of the substrings.

func StringContainsAllRune

func StringContainsAllRune(runes []rune) func(string) bool

StringContainsAllRune returns a function that returns true if the string contains all of the runes.

func StringContainsAny

func StringContainsAny(substrs []string) func(string) bool

StringContainsAny returns a function that returns true if the string contains any of the substrings.

func StringContainsAnyRune

func StringContainsAnyRune(runes []rune) func(string) bool

StringContainsAnyRune returns a function that returns true if the string contains any of the runes.

func StringContainsRune

func StringContainsRune(r rune) func(string) bool

StringContainsRune returns a function that returns true if the string contains the rune.

func StringEmpty

func StringEmpty(s string) bool

StringEmpty returns true if the string is empty.

func StringEqual

func StringEqual(other string) func(string) bool

StringEqual returns a function that returns true if the string is equal to the other string.

func StringEqualFold

func StringEqualFold(other string) func(string) bool

StringEqualFold returns a function that returns true if the string is equal to the other string, ignoring case.

func StringHasPrefix

func StringHasPrefix(prefix string) func(string) bool

StringHasPrefix returns a function that returns true if the string has the prefix.

func StringHasSuffix

func StringHasSuffix(suffix string) func(string) bool

StringHasSuffix returns a function that returns true if the string has the suffix.

func StringNotEmpty

func StringNotEmpty(s string) bool

StringNotEmpty returns true if the string is not empty.

func StringNotEqual

func StringNotEqual(other string) func(string) bool

StringNotEqual returns a function that returns true if the string is not equal to the other string.

func StringNotEqualFold

func StringNotEqualFold(other string) func(string) bool

StringNotEqualFold returns a function that returns true if the string is not equal to the other string, ignoring case.

Types

This section is empty.

Jump to

Keyboard shortcuts

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