Skip to content

hahnicity/filterutils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Filterutils

=============

Filter tools for Go!

Usage

======== func Search(n int, f, g func(int) bool) bool

Execute a Binary Search for a specific item in a list matching function g. If the item is not found, continue the search based on specifications of function f. Return true/false depending on whether an item is in our data set

    func StringInSortedSlice(a []string, x string) bool

Execute a Binary Search for a specifc string x in a slice a. Return true/false depending on whether our string x is contained in slice a.

    func HasSuffix(a []string, suf string) []string

Search over a slice a for all elements with the suffix suf. Return a slice of strings

    func Filter(a []string, f func(int) bool) []string

Search over a slice a for all elements satisfying a specific function f. Return a slice of all strings matching the criteria specified in f.

About

Filter tools for Go!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages