los

package
v1.0.18 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: MIT Imports: 2 Imported by: 13

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func EveryNil added in v1.0.11

func EveryNil(elems ...any) bool
Example

ExampleEveryNil is an example function.

Output:

true
false

func Pull

func Pull[V comparable](collection []V, elements ...V) []V

Pull 删除切片指定成员.

Example

ExamplePull is an example function.

Output:

[1 3]

func PullAt

func PullAt[V any](collection []V, indices ...int) []V

PullAt 删除切片指定位置.

Example

ExamplePullAt is an example function.

Output:

[49 50]

func Remove

func Remove[V comparable](collection []V, predicate func(V, int) bool) []V

Remove 根据断言删除.

Example

ExampleRemove is an example function.

Output:

[1 3]

func SomeNil added in v1.0.11

func SomeNil(elems ...any) bool
Example

ExampleSomeNil is an example function.

Output:

true
false

func Split

func Split[T comparable](collection []T, isSeparator func(T, int) bool) [][]T

Split 切片分解.

Example

ExampleSplit is an example function.

Output:

[[1] [2 3] [4] [5]]

func SplitStr

func SplitStr(str string, separators ...rune) []string

SplitStr 字符串根据分隔符分解.

Example

ExampleSplitStr is an example function.

Output:

[123 456]
[a b c]

Types

This section is empty.

Jump to

Keyboard shortcuts

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