slices

package
v0.0.0-...-d8850a5 Latest Latest
Warning

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

Go to latest
Published: May 1, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

切片

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains[T comparable](s []T, v T) bool

Contains 是否包含

func Diff

func Diff[T comparable](s []T, s2 []T) (r []T)

Diff 差集

func In

func In[T comparable](s []T, key T) bool

In 检测是否存在

func Index

func Index[T comparable](s []T, v T) int

Index 返回下标

func Merge

func Merge[T comparable](s, s2 []T, isUnique bool) (r []T)

Merge 合并

func ToString

func ToString[T comparable](s []T, sep string) (r string)

ToString 转字符串

func Unique

func Unique[T comparable](s []T) (r []T)

Unique 去重

Types

This section is empty.

Jump to

Keyboard shortcuts

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