util

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommonPrefix

func CommonPrefix(first, second string) string

CommonPrefix returns the common prefix of the specified strings. An empty string is returned if the parameters have no prefix in common.

func Max

func Max(args ...int) int

Max returns the value of the largest argument.

func Maxf

func Maxf(args ...float64) float64

Maxf returns the value of the largest argument.

func Min

func Min(args ...int) int

Min returns the value of the smallest argument.

func Minf

func Minf(args ...float64) float64

Minf returns the value of the smallest argument.

func SliceContains

func SliceContains(terms []string, q string) bool

SliceContains returns true if terms contains q, or false otherwise.

func UniqueSlice

func UniqueSlice(items []string) []string

UniqueSlice returns a slice containing the unique items from the specified string slice. The items in the output slice are in the order in which they occur in the input slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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