slice

package
v1.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: BSD-3-Clause, MIT Imports: 0 Imported by: 0

Documentation

Overview

Package slice contains functions for manipulating slices

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsInt

func ContainsInt(a int, list []int) bool

ContainsInt checks if an int is found in a slice of ints.

func ContainsString

func ContainsString(a string, list []string) bool

ContainsString checks if a string is found in a slice of strings.

func ConvertToBoolMap

func ConvertToBoolMap(slice []string) (mapped map[string]bool)

ConvertToBoolMap converts a slice to a map of booleans.

func ConvertToIntMap

func ConvertToIntMap(slice []string) (mapped map[string]int)

ConvertToIntMap converts a slice to a map of indices.

func IndexOfString

func IndexOfString(str string, s []string) int

IndexOfString returns the index of a value in a slice.

func ReverseInt

func ReverseInt(s []int) []int

ReverseInt reverses a []int.

func ReverseString

func ReverseString(s []string) []string

ReverseString reverses a []string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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