Standard library / bytes

bytes.ToLower()

Converts Unicode letters to their lowercase equivalents; not full locale-aware case mapping. Expected stdout: 'go é\n'.

Formal Syntax & Structure

go syntaxgo
func ToLower(s []byte) []byte

Parameters & Attributes

NameTypeDescription
s[]byteInput text or sequence.

Return Value

[]byte

Converts Unicode letters to their lowercase equivalents; not full locale-aware case mapping.

Working Example

Example Snippetgo
package main
import (  "bytes"  "fmt")
func main() {  fmt.Println(string(bytes.ToLower([]byte("GO É"))))}
Go Reference