xcollect

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Overview

---------------------------------------------------------------------//

GNU GENERAL PUBLIC LICENSE                       //
   Version 2, June 1991                          //
                                                 //

Copyright (C) Wells Hsu, wellshsu@outlook.com, All rights reserved. // Everyone is permitted to copy and distribute verbatim copies // of this license document, but changing it is not allowed. //

SEE LICENSE.md FOR MORE DETAILS.                   //

---------------------------------------------------------------------//

---------------------------------------------------------------------//

GNU GENERAL PUBLIC LICENSE                       //
   Version 2, June 1991                          //
                                                 //

Copyright (C) Wells Hsu, wellshsu@outlook.com, All rights reserved. // Everyone is permitted to copy and distribute verbatim copies // of this license document, but changing it is not allowed. //

SEE LICENSE.md FOR MORE DETAILS.                   //

---------------------------------------------------------------------//

---------------------------------------------------------------------//

GNU GENERAL PUBLIC LICENSE                       //
   Version 2, June 1991                          //
                                                 //

Copyright (C) Wells Hsu, wellshsu@outlook.com, All rights reserved. // Everyone is permitted to copy and distribute verbatim copies // of this license document, but changing it is not allowed. //

SEE LICENSE.md FOR MORE DETAILS.                   //

---------------------------------------------------------------------//

---------------------------------------------------------------------//

GNU GENERAL PUBLIC LICENSE                       //
   Version 2, June 1991                          //
                                                 //

Copyright (C) Wells Hsu, wellshsu@outlook.com, All rights reserved. // Everyone is permitted to copy and distribute verbatim copies // of this license document, but changing it is not allowed. //

SEE LICENSE.md FOR MORE DETAILS.                   //

---------------------------------------------------------------------//

---------------------------------------------------------------------//

GNU GENERAL PUBLIC LICENSE                       //
   Version 2, June 1991                          //
                                                 //

Copyright (C) Wells Hsu, wellshsu@outlook.com, All rights reserved. // Everyone is permitted to copy and distribute verbatim copies // of this license document, but changing it is not allowed. //

SEE LICENSE.md FOR MORE DETAILS.                   //

---------------------------------------------------------------------//

---------------------------------------------------------------------//

GNU GENERAL PUBLIC LICENSE                       //
   Version 2, June 1991                          //
                                                 //

Copyright (C) Wells Hsu, wellshsu@outlook.com, All rights reserved. // Everyone is permitted to copy and distribute verbatim copies // of this license document, but changing it is not allowed. //

SEE LICENSE.md FOR MORE DETAILS.                   //

---------------------------------------------------------------------//

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Append

func Append(collection interface{}, element interface{}) bool

[Deprecated]在集合中新增元素(支持指针类型的slice),element为所要新增的元素

func AppendForAny

func AppendForAny(arr []interface{}, ele interface{}) []interface{}

在数组中新增元素(interface{}),ele为元素

func AppendForInt

func AppendForInt(arr []int, ele int) []int

在数组中新增元素(int),ele为元素

func AppendForInt32

func AppendForInt32(arr []int32, ele int32) []int32

在数组中新增元素(int32),ele为元素

func AppendForInt64

func AppendForInt64(arr []int64, ele int64) []int64

在数组中新增元素(int64),ele为元素

func AppendForStr

func AppendForStr(arr []string, ele string) []string

在数组中新增元素(string),ele为元素

func Clear

func Clear(collection interface{}) bool

[Deprecated]清空集合中的元素(支持指针类型的map和slice)

func Contains

func Contains(collection interface{}, compare interface{}) bool

[Deprecated]判断集合是否存在元素(支持指针类型的map和slice),compare为元素或对比函数

func ContainsForAny

func ContainsForAny(arr []interface{}, ele interface{}) bool

判断数组是否存在元素(interface{}),ele为元素

func ContainsForInt

func ContainsForInt(arr []int, ele int) bool

判断数组是否存在元素(int),ele为元素

func ContainsForInt32

func ContainsForInt32(arr []int32, ele int32) bool

判断数组是否存在元素(int32),ele为元素

func ContainsForInt64

func ContainsForInt64(arr []int64, ele int64) bool

判断数组是否存在元素(int64),ele为元素

func ContainsForStr

func ContainsForStr(arr []string, ele string) bool

判断数组是否存在元素(string),ele为元素

func Delete

func Delete(collection interface{}, compare interface{}) bool

[Deprecated]从集合中移除元素(支持指针类型的map和slice),compare为索引或key值

func DeleteForAny

func DeleteForAny(arr []interface{}, ele int) []interface{}

从数组中移除元素(interface{}),ele为索引

func DeleteForInt

func DeleteForInt(arr []int, ele int) []int

从数组中移除元素(int),ele为索引

func DeleteForInt32

func DeleteForInt32(arr []int32, ele int) []int32

从数组中移除元素(int32),ele为索引

func DeleteForInt64

func DeleteForInt64(arr []int64, ele int) []int64

从数组中移除元素(int64),ele为索引

func DeleteForStr

func DeleteForStr(arr []string, ele int) []string

从数组中移除元素(string),ele为索引

func Find

func Find(collection interface{}, compare interface{}) interface{}

[Deprecated]从集合中查找元素(支持指针类型的map和slice),compare为元素或对比函数

func Index

func Index(collection interface{}, compare interface{}) interface{}

[Deprecated]从集合中索引元素(支持指针类型的map和slice),compare为元素或对比函数,当集合为slice时返回number,map则返回相应key

func IndexForAny

func IndexForAny(arr []interface{}, ele interface{}) int

从数组中索引元素(interface{}),ele为元素

func IndexForInt

func IndexForInt(arr []int, ele int) int

从数组中索引元素(int),ele为元素

func IndexForInt32

func IndexForInt32(arr []int32, ele int32) int

从数组中索引元素(int32),ele为元素

func IndexForInt64

func IndexForInt64(arr []int64, ele int64) int

从数组中索引元素(int64),ele为元素

func IndexForStr

func IndexForStr(arr []string, ele string) int

从数组中索引元素(string),ele为元素

func Remove

func Remove(collection interface{}, compare interface{}) bool

[Deprecated]从集合中移除元素(支持指针类型的map和slice),compare为元素或对比函数

func RemoveForAny

func RemoveForAny(arr []interface{}, ele interface{}) []interface{}

从数组中移除元素(interface{}),ele为元素

func RemoveForInt

func RemoveForInt(arr []int, ele int) []int

从数组中移除元素(int),ele为元素

func RemoveForInt32

func RemoveForInt32(arr []int32, ele int32) []int32

从数组中移除元素(int32),ele为元素

func RemoveForInt64

func RemoveForInt64(arr []int64, ele int64) []int64

从数组中移除元素(int64),ele为元素

func RemoveForStr

func RemoveForStr(arr []string, ele string) []string

从数组中移除元素(string),ele为元素

Types

This section is empty.

Jump to

Keyboard shortcuts

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