How do I convert a string to a lower case representation?

How do I convert a string to a lower case representation?

I feel that there must be built-in function for it, but I just can’t find it.

I did find a ToLower in “unicode/letter”, but it only works one rune at a time.

1 Like

Yes there is, check the strings package.

package main

import (
    "fmt"
    "strings"
)

func main() {
    fmt.Println(strings.ToLower("Gopher"))
}

Refer: stackoverflow.com