slice

package
v0.2.14 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2020 License: MPL-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChunkStrings added in v0.2.11

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 added in v0.2.11

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 added in v0.1.2

func IdenticalStrings(a, b []string) bool

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

func StringIndex added in v0.1.1

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