Kodewick
Start learning →
Starter←→0 / 70

Name on the cup

#031StarterStrings2 min

The coffee shop writes each customer's name on the cup in capitals so it's easy to read. Write CupName(name) to return the name in upper case. Anything that isn't a letter (like -) stays as it is.

Examples
CupName("lily")→'LILY'
CupName("Tom")→'TOM'
The functionfunc CupName(name string) string
main.go
package main

import "strings"

func CupName(name string) string {
	// your code here: strings.ToUpper to make name upper case
	return name
}
Ctrl + Enter runs too
Result

Run tries the examples. When they look right, Submit.