Standard library / unicode

unicode.ToTitle()

Returns the titlecase mapping of a rune, or the rune itself if none. Expected stdout: 'Dž\n'.

Formal Syntax & Structure

go syntaxgo
func ToTitle(r rune) rune

Parameters & Attributes

NameTypeDescription
rruneUnicode code point.

Return Value

rune

Returns the titlecase 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.ToTitle('dž')))}
Go Reference