Golang bytes.ToLower() function example
package bytes
ToLower returns a copy of the byte input slice with all Unicode letters mapped to their lower case.
Golang bytes.ToLower() function usage example
package main
import (
"fmt"
"bytes"
)
func main() {
str := []byte("ALL CAPITAL LETTERS")
tolower := bytes.ToLower(str)
fmt.Println(string(str))
fmt.Println(string(tolower))
}
Output :
ALL CAPITAL LETTERS
all capital letters
Reference :
Advertisement
Something interesting
Tutorials
+12k Golang : How to parse plain email text and process email header?
+4.9k Which content-type(MIME type) to use for JSON data
+10.3k Golang : How to profile or log time spend on execution?
+10.5k Generate Random number with math/rand in Go
+8.5k Golang : Generate Datamatrix barcode
+13.9k Golang : Convert spaces to tabs and back to spaces example
+5.5k Golang : Get S3 or CloudFront object or file information
+43.5k Golang : Convert []byte to image
+41.5k Golang : Convert string to array/slice
+30.1k Golang : Get time.Duration in year, month, week or day
+7.5k Golang : Get YouTube playlist
+7.8k Golang : How to execute code at certain day, hour and minute?