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) stringParameters & Attributes
| Name | Type | Description |
|---|---|---|
| s | string | Input 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 é")))}