Standard library / unicode

unicode.SpecialCase.ToTitle()

Applies the language-specific title mapping to one rune, falling back to the default mapping if no override exists. Expected stdout: 'İ\n'.

Formal Syntax & Structure

go syntaxgo
func (special SpecialCase) ToTitle(r rune) rune

Parameters & Attributes

NameTypeDescription
rruneUnicode code point.

Return Value

rune

Applies the language-specific title mapping to one rune, falling back to the default mapping if no override exists.

Working Example

Example Snippetgo
package main
import (  "fmt"  "unicode")
func main() {  fmt.Println(string(unicode.TurkishCase.ToTitle('i')))}
Go Reference