|
|
@@ -62,6 +62,7 @@ func returnRandom(l int) int {
|
|
|
return s1.Intn(l)+1
|
|
|
}
|
|
|
|
|
|
+
|
|
|
func returnStringCharUp(stringa string) string {
|
|
|
/*
|
|
|
prende una stringa e cambia lo stato di un carattere (da lower a upper e viceversa)
|
|
|
@@ -81,19 +82,23 @@ func returnStringCharUp(stringa string) string {
|
|
|
}
|
|
|
|
|
|
func returnStringToLower(stringa string) string {
|
|
|
- // ritorna la stringa passata in lower.mode
|
|
|
+ /*
|
|
|
+ ritorna la stringa passata in lower.mode
|
|
|
+ */
|
|
|
return strings.ToLower(stringa)
|
|
|
}
|
|
|
|
|
|
func Run(filedaleggere string) string {
|
|
|
-
|
|
|
+ /*
|
|
|
+ procede alla lettura del file indicato che e' sempre necessario
|
|
|
+ */
|
|
|
result := caricaFile(filedaleggere)
|
|
|
if result == nil {
|
|
|
fmt.Printf("Errore di lettura file '%s', esco.\n",filedaleggere)
|
|
|
os.Exit(98)
|
|
|
}
|
|
|
|
|
|
- // effettua la scnasione del file e ne legge il contenuto
|
|
|
+ // effettua la scasione del file e ne legge il contenuto
|
|
|
l := scansioneFile(result)
|
|
|
if l == nil {
|
|
|
fmt.Println("Errore di lettura, esco.")
|
|
|
@@ -117,6 +122,7 @@ func Run(filedaleggere string) string {
|
|
|
}
|
|
|
counter++
|
|
|
}
|
|
|
+
|
|
|
risultato1 = returnStringToLower(risultato1)
|
|
|
risultato1 = returnStringCharUp(risultato1)
|
|
|
|