utils

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeepEqualUnsorted

func DeepEqualUnsorted(p1, p2 interface{}, equal func(i1, i2 int) bool) bool

DeepEqualUnsorted check equality of unsorted arrays. Panic if p1 or p2 isn't array

func GCD added in v0.7.1

func GCD(a, b int) int

GCD calculates the Greatest Common Divisor between a and b

func LCM added in v0.7.1

func LCM(a, b int) int

LCM calculates the Least Common Multiple between a and b

func SplitMin

func SplitMin(str string, sub string, min int) []string

SplitMin slices string in at least min items

func StringInSlice

func StringInSlice(a string, slice []string) bool

StringInSlice check whether string a is a member of slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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