Standard library / strings

strings.ToUpper()

Converts Unicode letters to uppercase equivalents; not full locale-aware case mapping. Expected stdout: 'GO É\n'.

Formal Syntax & Structure

go syntaxgo
func ToUpper(s string) string

Parameters & Attributes

NameTypeDescription
sstringInput text or sequence.

Return Value

string

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

Working Example

Example Snippetgo
package main
import (  "fmt"  "strings")
func main() {  fmt.Println(string(strings.ToUpper("go é")))}
Go Reference