You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

21 lines
282 B

package main
import (
"fmt"
"os"
"unicode"
)
func main() {
if len(os.Args) == 2 {
s := os.Args[1]
for i, r := range s {
if unicode.IsLower(r) {
s[i] = unicode.ToUpper(r)
} else if unicode.IsUpper(r) {
s[i] = unicode.ToLower(r)
}
}
fmt.Println(s)
}
}