Standard library / unicode

unicode.ToUpper()

Returns the uppercase mapping of a rune, or the rune itself if none. Expected stdout: 'A\n'.

Formal Syntax & Structure

go syntaxgo
func ToUpper(r rune) rune

Parameters & Attributes

NameTypeDescription
rruneUnicode code point.

Return Value

rune

Returns the uppercase mapping of a rune, or the rune itself if none.

Working Example

Example Snippetgo
package main
import (  "fmt"  "unicode")
func main() {  fmt.Println(string(unicode.ToUpper('a')))}
Go Reference