Golang unicode.ToTitle() function example

package unicode

Golang unicode.ToTitle() function usage example.

 package main

 import (
 "fmt"
 "unicode"
 )

 func main() {

 TitleCaseRune := unicode.ToTitle('a')
 fmt.Printf("%+q\n", TitleCaseRune)
 }

Reference :

https://golang.org/pkg/unicode/#ToTitle

Advertisement