This commit is contained in:
2025-03-10 21:40:07 +02:00
parent 28033bbe00
commit 5811e43f3c
2 changed files with 50 additions and 1 deletions

17
main.go
View File

@@ -1,9 +1,24 @@
package main
import "fmt"
import (
"fmt"
"strings"
)
func main() {
fmt.Println("Hello, World!")
}
func cleanInput(text string) []string {
// trim input string
text = strings.TrimSpace(text)
// convert to lowercase
text = strings.ToLower(text)
// replace all double spaces into single space
text = strings.Replace(text, " ", " ", -1)
// split by space
separated := strings.Split(text, " ")
return separated
}