slices

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendAt

func AppendAt(slice []string, pos int, insert ...string) []string

AppendAt: Add data at a specified position in slice of a string

func CheckForDupSl2d

func CheckForDupSl2d(sl [][]string) bool

CheckForDupSl2d: Return true if duplicated row is found

func CmpRemSl2d

func CmpRemSl2d(sl1, sl2 [][]string) (outSlice [][]string)

CmpRemSl2d: Compare slice1 and slice2 if row exist on both, the raw is removed from slice2 and result returned.

func DeleteSlIface

func DeleteSlIface(slice interface{}, idx int) bool

DeleteSlIface: designed to accept all types. Return true on success. NOTE: 'slice' argument MUST be given as pointer '&'

func GetStrIndex

func GetStrIndex(slice []string, item string) int

GetStrIndex: Get index of a string in a slice, Return -1 if no entry found ...

func GetStrIndex2dCol

func GetStrIndex2dCol(slice [][]string, value string, col int) int

GetStrIndex2dCol: Search in 2d string slice if a column's value exist and return row number.

func IsExist2d

func IsExist2d(slice [][]string, cmpRow []string) bool

IsExist2d Search in 2d string slice if a row exist (deepequal row).

func IsExist2dCol

func IsExist2dCol(slice [][]string, value string, col int) bool

IsExist2dCol: Search in 2d string slice if a column's value exist.

func IsExistSl

func IsExistSl(slice []string, item string) bool

IsExistSl: if exist then ...

func IsExistSlIface

func IsExistSlIface(slice interface{}, item interface{}) int

IsExistSlIface: Same as above but designed to accept all types. Return the position whether it found or -1 if not.

func Preppend

func Preppend(slice []string, prepend ...string) []string

Preppend: Add data at the begining of a string slice

func RemDupSlIface

func RemDupSlIface(slice1, slice2 interface{}) bool

RemDupSlIface: Designed to accept all types. Remove duplicate entries Returns true if something has changed, false otherwise. NOTE: 'slice' argument MUST be given as pointer '&'

func RemoveDupSl

func RemoveDupSl(slice []string) []string

RemoveDupSl: Remove duplicate entry in a string slice

func RemoveDupSl2d

func RemoveDupSl2d(slice [][]string, col int) (outSlice [][]string)

RemoveDupSl2d: Remove duplicate entry in a 2d string slice based on column number content.

func SearchSl

func SearchSl(find string, table [][]string, caseSensitive, POSIXcharClass, POSIXstrictMode, regex, wholeWord bool) (out [][]string, err error)

SearchSl: Search in 2d string slice. cs=case sensitive, ww=whole word, rx=regex

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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