Standard library / bytes
bytes.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 []byte) []byteParameters & Attributes
| Name | Type | Description |
|---|---|---|
| s | []byte | Input text or sequence. |
Return Value
[]byte
Converts Unicode letters to uppercase equivalents; not full locale-aware case mapping.
Working Example
Example Snippetgo
package main
import ( "bytes" "fmt")
func main() { fmt.Println(string(bytes.ToUpper([]byte("go é"))))}