slice

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2025 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cover

func Cover(s []string, unrepeated ...bool) []int32

Cover 字符串切片转int32切片 unrepeated 去重

func Has

func Has[T comparable](arr []T, tar T) bool

func IndexOf

func IndexOf[T comparable](arr []T, tar T) int

func Last added in v1.5.3

func Last[T comparable](arr []T, n int) []T

Last 取结尾 n 个

func Max

func Max[T constraints.Ordered](nums []T) (r T)

func Min

func Min[T constraints.Ordered](nums []T) (r T)

func Multiple

func Multiple(src string, char1, char2 string) (r [][]int32)

func ParseInt32

func ParseInt32(v string) (int32, error)

func ParseInt64 added in v1.4.0

func ParseInt64(v string) (int64, error)

func Roll

func Roll[T constraints.Ordered](nums []T) (r T)

func Split

func Split(src string, char ...string) []string

func SplitAndUnrepeated

func SplitAndUnrepeated(src string, char ...string) []int32

SplitAndUnrepeated 切割并去重

func SplitInt32 added in v1.4.0

func SplitInt32(src string, char ...string) (r []int32)

func SplitInt64 added in v1.4.0

func SplitInt64(src string, char ...string) (r []int64)

func String

func String[T comparable](arr []T, split ...string) string

String 转换成split分割的字符串,默认,分割

func Unrepeated

func Unrepeated[T comparable](arr []T) []T

Unrepeated 去重

Types

This section is empty.

Jump to

Keyboard shortcuts

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