strings.Title() Function returns a copy of string s with all Unicode letters of string whose begin words mapped to their Unicode title case. This method belongs to the strings package.
C
Output:
C
Output:
Syntax:Example 1:func Title(s string) stringIt returns the string.
// Golang program to illustrate the strings.Title() function
package main
import (
"fmt"
"strings"
)
// Main function
func main() {
fmt.Println(strings.Title("geeks for geeks"))
}
Geeks For GeeksExample 2:
// Golang program to illustrate the strings.Title() function
package main
import (
"fmt"
"strings"
)
// Main function
func main() {
fmt.Println(strings.Title("computer science portal"))
}
Computer Science Portal