tools

package
v0.0.0-...-fe5df96 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupNames

func CleanupNames(s string) string

CleanupNames removes all non-alphanumeric characters

func ConstantStringFromRegex

func ConstantStringFromRegex(regex string) string

func Filter

func Filter[T any](input []T, predicate func(T) bool) []T

func ItemInList

func ItemInList[T comparable](needle T, haystack []T) bool

func LowerCamelCase

func LowerCamelCase(s string) string

func Map

func Map[T any, O any](input []T, mapper func(T) O) []O

func RegexMatchesConstantString

func RegexMatchesConstantString(regex string) bool

naive way of checking if the input regex describes a constant string, or something else. ex: `^math$` or `^reduce$` would return true, while `^foo[0-9]+$` wouldn't

func SnakeCase

func SnakeCase(s string) string

func StringInListEqualFold

func StringInListEqualFold(needle string, haystack []string) bool

func UpperCamelCase

func UpperCamelCase(s string) string

func UpperSnakeCase

func UpperSnakeCase(s string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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