New mod management, new parameter -mods

This commit is contained in:
Andreas Neue 2016-03-19 23:49:41 +01:00
parent 1dad661ceb
commit 7bffa566c5
13 changed files with 57 additions and 43 deletions

View file

@ -6,6 +6,7 @@ import (
"bytes"
"math/rand"
"strconv"
"strings"
"time"
)
@ -52,3 +53,14 @@ func Random(min, max int) int {
rand.Seed(time.Now().Unix())
return rand.Intn(max-min) + min
}
func ReplaceUmlauts(s string) string {
ret := strings.Replace(s, "Ä", "Ae", -1)
ret = strings.Replace(ret, "Ö", "Oe", -1)
ret = strings.Replace(ret, "Ü", "Ue", -1)
ret = strings.Replace(ret, "ä", "ae", -1)
ret = strings.Replace(ret, "ö", "oe", -1)
ret = strings.Replace(ret, "ü", "ue", -1)
ret = strings.Replace(ret, "ß", "ss", -1)
return ret
}