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.
 
 
 
 

32 lines
444 B

package main
import (
"fmt"
"os"
"strconv"
)
func main() {
args := os.Args[1:]
if len(args) == 0 {
return
}
var upper bool
if args[0] == "--upper" {
upper = true
args = args[1:]
}
for _, arg := range args {
if nb, err := strconv.Atoi(arg); err != nil || nb < 1 || nb > 26 {
fmt.Print(" ")
} else {
if upper {
nb += 'A' - 1
} else {
nb += 'a' - 1
}
fmt.Printf("%c", rune(nb))
}
}
fmt.Println()
}