How do I convert a string to a lower case representation?
If you happen to be too lazy to click through to the strings package, here's example code:
strings.ToLower("Hello, WoRLd") // => "hello, world"
If you need to handle a Unicode Special Case like Azeri or Turkish, you can use ToLowerSpecial
:
strings.ToLowerSpecial(unicode.TurkishCase, "Hello, WoRLd") // => "hello, world"
Yes there is, check the strings package.
package main
import (
"fmt"
"strings"
)
func main() {
fmt.Println(strings.ToLower("Gopher"))
}