arrays

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package arrays provides utility functions for arrays

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(array []string, value string) bool

Contains indicates if a slice contains a provided string value

If the value is not present in the collection, then IndexOf will return false

func Dequeue

func Dequeue(queue []string) (string, error)

Dequeue supports queue operations, it returns the first value in a slice and removes it from the slice

If the slice is empty, the function will return an error

func IndexOf

func IndexOf(array []string, value string) int

IndexOf returns the index of the desired value in the slice.

If the value is not present in the collection, then IndexOf will return -1

func RemoveDuplicatedStrings

func RemoveDuplicatedStrings(array []string) []string

RemoveDuplicatedStrings receives a slice and removes the duplicated values

Types

This section is empty.

Jump to

Keyboard shortcuts

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