2024-07-24 17:36:01 +02:00
|
|
|
package misc
|
|
|
|
|
|
|
|
func StringIsInStringSlice(slice []string, s string) bool {
|
|
|
|
for _, item := range slice {
|
|
|
|
if item == s {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return false
|
|
|
|
}
|
2024-07-25 21:45:29 +02:00
|
|
|
|
|
|
|
func RemoveStringFromStringSlice(slice []string, s string) []string {
|
|
|
|
a := []string{}
|
|
|
|
for _, item := range slice {
|
|
|
|
if item != s {
|
|
|
|
a = append(a, item)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return a
|
|
|
|
}
|