The Go language converts all strings to uppercase or lowercase

  • 2020-05-24 05:42:00
  • OfStack

This example demonstrates how the Go language converts all strings to uppercase or lowercase. Share with you for your reference. The details are as follows:

The string module of the Go language contains the ToLower and ToUpper functions for converting strings to lowercase and uppercase

package main
import (
  "fmt"
  "strings"
)
func main() {
  fmt.Println(strings.ToUpper("hello world"))
}

I hope this article has been helpful to you in the programming of Go language.


Related articles: