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
--allow-builtin
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 Capitalize(s string) string {
}
Usage
Here is a possible program to test your function :
package main
import (
"fmt"
"piscine"
)
func main(){
fmt.Println(piscine.Capitalize("Hello! How are you? How+are+things+4you?"))
}
And its output :
$ go run .
Hello! How Are You? How+Are+Things+4you?
$

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!