diff options
| author | Nikolaus Gotsche <n@softwarefools.com> | 2018-10-25 03:54:43 +0200 |
|---|---|---|
| committer | Nikolaus Gotsche <n@softwarefools.com> | 2018-10-25 03:54:43 +0200 |
| commit | 25e12980c0448cb58e545fffa137905fd861dea3 (patch) | |
| tree | f93ee9c04f5a627283f5c75555dd4a6dd0c68f9c /utils.go | |
| parent | 261d250f50b17117e99ab8b4b6ac7dfd35371386 (diff) | |
Resume now fully functional0.3.3
Diffstat (limited to 'utils.go')
| -rw-r--r-- | utils.go | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -248,3 +248,32 @@ func sumFloatArray(in []float64) (sum float64) { } return } + +func isElement(some int, group []int) bool { + for _, e := range group { + if e == some { + return true + } + } + return false +} + +func removeItems(master, rem []int) []int { + var out []int + for _, v := range master { + if !isElement(v, rem) { + out = append(out, v) + } + } + return out +} + +func IsStrElement(some string, group []string) bool { + for _, e := range group { + if e == some { + return true + } + } + return false +} + |
