goutils

package module
v0.0.0-...-b8c73ff Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2017 License: MIT Imports: 5 Imported by: 0

README

Go utility library

Made for personal use

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsString

func ContainsString(universe []string, candidate string) bool

ContainsString returns true if the array contains the candidate string.

func IndexOfString

func IndexOfString(universe []string, candidate string) int

IndexOfString returns the index of the first occurrence of t in arr. Returns -1 if not found.

func IntArrayToString

func IntArrayToString(input []int) []string

IntArrayToString turns an array of ints into an array of strings.

func ReadLines

func ReadLines(path string) ([]string, error)

ReadLines reads a file and returns a string array of the lines.

func RemoveIntAtIndex

func RemoveIntAtIndex(arr []int, index int) ([]int, error)

RemoveIntAtIndex returns a slice with the index missing

func RemoveStringAtIndex

func RemoveStringAtIndex(arr []string, index int) ([]string, error)

RemoveStringAtIndex returns a slice with the index missing

func ReverseArrayInt

func ReverseArrayInt(a []int) []int

ReverseArrayInt reverses a slice

func StringArrayToInt

func StringArrayToInt(input []string) ([]int, error)

StringArrayToInt turns an array of strings into an array of ints.

func StringSplitNewline

func StringSplitNewline(s string) []string

StringSplitNewline provides cross-platform splitting s is the string to split. If s contains \r\n, that's used as the separator. Otherwise, \n is used.

Types

This section is empty.

Jump to

Keyboard shortcuts

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