slice

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: MPL-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChunkStrings

func ChunkStrings(slice []string, size int) (chunked [][]string)

Chunk slice of strings, returning a slice of slices of strings, each one a maximum of length `size`

func ContainsString

func ContainsString(slice []string, str string) bool

Return true if the given slice contains the given string

func EqualChunkStrings

func EqualChunkStrings(slice []string, size int) (chunked [][]string)

Chunk slice of strings, returning a slice of slices of strings, each one of length `size`. If slice does not divide cleanly into size chunks, the last chunk is filled with elements of empty strings to make it so

func IdenticalStrings

func IdenticalStrings(a, b []string) bool

Return true if the given slices are identical in length and contents

func StringIndex

func StringIndex(slice []string, str string) int

Return index of matching string in slice; otherwise return -1

Types

This section is empty.

Jump to

Keyboard shortcuts

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