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
+9.9k Android Studio : Create custom icons for your application example
+9.6k Golang : Get UDP client IP address and differentiate clients by port number
+11.2k Golang : Search and extract certain XML data example
+7.7k Golang : Gorilla web tool kit schema example
+15.7k Golang : How to tell if a file is compressed either gzip or zip ?
+7k Golang : Get final or effective URL with Request.URL example
+17k Golang : Iterating Elements Over A List
+9k Golang : Use regular expression to get all upper case or lower case characters example
+9.1k Golang : Wait and sync.WaitGroup example
+36k Golang : Read a text file and replace certain words
+21.1k Golang : How to read JPG(JPEG), GIF and PNG files ?
+29k Golang : Calculate percentage change of two values