Golang bytes.Title() function example
package bytes
Title returns a copy of of the given input string with all Unicode letters that begin words mapped to their title case.
Golang bytes.Title() function usage example
package main
import (
"bytes"
"fmt"
)
func main() {
str := []byte("this is a title!")
title := bytes.Title(str)
fmt.Println(string(str))
fmt.Println(string(title))
}
Output :
this is a title!
This Is A Title!
Reference :
Advertisement
Something interesting
Tutorials
+7.5k Golang : Process json data with Jason package
+34k Golang : Proper way to set function argument default value
+8.9k Golang : Find network service name from given port and protocol
+6.9k Mac OSX : Find large files by size
+32.5k Golang : Copy directory - including sub-directories and files
+5k Golang : Get a list of crosses(instruments) available to trade from Oanda account
+5.8k Javascript : How to replace HTML inside <div>?
+6.9k How to let Facebook Login button redirect to a particular URL ?
+9.1k Golang : Serving HTTP and Websocket from different ports in a program example
+6.8k Golang : Calculate pivot points for a cross
+7.4k Golang : Check to see if *File is a file or directory