package main
import (
"bytes"
"fmt"
)
func main() {
slice_1 := []byte{
'G'
,
'E'
,
'E'
,
'K'
,
'S'
}
slice_2 := []byte{
'A'
,
'P'
,
'P'
,
'L'
,
'E'
}
fmt.Println(
"Original slice:"
)
fmt.Printf(
"Slice 1: %s"
, slice_1)
fmt.Printf(
"\nSlice 2: %s"
, slice_2)
res1 := bytes.ToLower(slice_1)
res2 := bytes.ToLower(slice_2)
res3 := bytes.ToLower([]byte(
"GEEKSFORGEEKS"
))
res4 := bytes.ToLower([]byte(
"GeeKSFORGeeKS"
))
fmt.Printf(
"\n\nNew Slice:"
)
fmt.Printf(
"\nSlice 1: %s"
, res1)
fmt.Printf(
"\nSlice 2: %s"
, res2)
fmt.Printf(
"\nSlice 3: %s"
, res3)
fmt.Printf(
"\nSlice 4: %s"
, res4)
}