util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2016 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Testers = []RuneTester{
	IsDigit,
	IsGraphic,
	IsLetter,
	IsLower,
	IsMark,
	IsNumber,
	IsPunct,
	IsSymbol,
	IsTitle,
	IsUpper,
}

Functions

func AbsInt

func AbsInt(x int) int

func LogMemory

func LogMemory()

func MD5File

func MD5File(fileName string) (string, error)

func Max

func Max(a, b int) int

func MaxInt

func MaxInt(v []int) (retval int)

func Min

func Min(a, b int) int

func NotDigitOrNeg

func NotDigitOrNeg(c rune) bool

func Prefix

func Prefix(s string, n int) string

func RangeInt

func RangeInt(to int) []int

func Sign

func Sign(x int) int

func Signature

func Signature(s string) string

func Strcmp

func Strcmp(a, b string) int

func Suffix

func Suffix(s string, n int) string

func TestEach

func TestEach(t RuneTester, s string) byte

Types

type ByGeneric

type ByGeneric []Generic

func (ByGeneric) Len

func (b ByGeneric) Len() int

func (ByGeneric) Less

func (b ByGeneric) Less(i, j int) bool

func (ByGeneric) Swap

func (b ByGeneric) Swap(i, j int)

type EnumSet

type EnumSet struct {
	Enum   map[interface{}]int
	Index  []interface{}
	Frozen bool
	// contains filtered or unexported fields
}

func NewEnumSet

func NewEnumSet(capacity int) *EnumSet

func (*EnumSet) Add

func (e *EnumSet) Add(value interface{}) (int, bool)

func (*EnumSet) IndexOf

func (e *EnumSet) IndexOf(value interface{}) (int, bool)

func (*EnumSet) Len

func (e *EnumSet) Len() int

func (*EnumSet) Print

func (e *EnumSet) Print()

func (*EnumSet) RebuildIndex

func (e *EnumSet) RebuildIndex()

func (*EnumSet) ValueOf

func (e *EnumSet) ValueOf(index int) interface{}

type Equaler

type Equaler interface {
	Equal(Equaler) bool
}

type Format

type Format interface {
	Format(value interface{}) string
}

type Generic

type Generic struct {
	Key   string
	Value interface{}
}

type Persist

type Persist interface {
	Read(reader io.Reader)
	Write(writer io.Writer)
}

type RuneTester

type RuneTester func(r rune) bool

type TopNStrIntData

type TopNStrIntData []TopNStrIntDatum

func (TopNStrIntData) Len

func (arr TopNStrIntData) Len() int

func (TopNStrIntData) Less

func (arr TopNStrIntData) Less(a, b int) bool

func (TopNStrIntData) Swap

func (arr TopNStrIntData) Swap(a, b int)

type TopNStrIntDatum

type TopNStrIntDatum struct {
	S string
	N int
}

func GetTopNStrInt

func GetTopNStrInt(m map[string]int, n int) []TopNStrIntDatum

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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