Golang bytes.ToUpper() function example
package bytes
ToUpper returns a copy of the input byte slice with all Unicode letters mapped to their upper case.
Golang bytes.ToUpper() function usage example
package main
import (
"fmt"
"bytes"
)
func main() {
str := []byte("a funky şğüöıi string.")
toupper := bytes.ToUpper(str)
fmt.Println("Original : " + string(str))
fmt.Println("ToUpper : " + string(toupper))
}
Output :
Original : a funky şğüöıi string.
ToUpper : A FUNKY ŞĞÜÖII STRING.
Reference :
Advertisement
Something interesting
Tutorials
+12.7k Golang : zlib compress file example
+8.3k Golang: Prevent over writing file with md5 hash
+5.5k Golang : If else example and common mistake
+15.9k Golang : Get file permission
+12.7k Golang : Add ASCII art to command line application launching process
+22.4k Golang : How to read JPG(JPEG), GIF and PNG files ?
+36.4k Golang : Convert date or time stamp from string to time.Time type
+15.6k Golang : Force download file example
+4.9k JQuery : Calling a function inside Jquery(document) block
+16.9k Golang : How to generate QR codes?
+7.5k Golang : Gorrila set route name and get the current route name
+13.8k Generate salted password with OpenSSL example