added UserDefined Module Naming

This commit is contained in:
Elmar Kresse
2023-09-22 15:54:34 +02:00
parent 20ec88d8d2
commit 99618c57c1
15 changed files with 249 additions and 150 deletions

View File

@@ -0,0 +1,22 @@
package functions
import "unicode"
// check if course is empty or contains only whitespaces
func CheckIfOnlyWhitespace(word string) bool {
for _, letter := range word {
if !unicode.IsSpace(letter) || !(letter == int32(160)) {
return false
}
}
return true
}
func Contains(s []string, e string) bool {
for _, a := range s {
if a == e {
return true
}
}
return false
}