Question: capitalize.go - - allow - builtin Instructions Write a function that capitalizes the first letter of each word and lowercases the rest. A word is
capitalize.go
allowbuiltin
Instructions
Write a function that capitalizes the first letter of each word and lowercases the rest.
A word is a sequence of alphanumeric characters.
Expected function
func Capitalizes string string
Usage
Here is a possible program to test your function :
package main
import
fmt
"piscine"
func main
fmtPrintlnpiscineCapitalizeHello How are you? Howarethingsyou?"
And its output :
$ go run
Hello! How Are You? HowAreThingsyou?
$
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
