utils

package
v0.0.0-...-8aa97ae Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AXorB

func AXorB[T comparable](a, b []T) (aNotB, xor, bNotA []T)

func AdjustPositions

func AdjustPositions(positions []int) []int

positions に対して、位置が昇順になるように調整するための増減値を返す

func Filter

func Filter[T any](arr []T, f func(T) bool) []T

func FilterAndReplaceSymbols

func FilterAndReplaceSymbols(input string) string

func Flatten

func Flatten[V any](arr [][]V) []V

func GetMentionRegex

func GetMentionRegex() *regexp.Regexp

func Map

func Map[T, U any](arr []T, f func(T) U) []U

func MapMap

func MapMap[K comparable, T, V any](m []T, f func(T) (K, V)) map[K]V

func Values

func Values[M ~map[K]V, K comparable, V any](m M) []V

Types

This section is empty.

Jump to

Keyboard shortcuts

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