Home »
Golang »
Golang Reference
Golang unicode.TitleCase Constant with Examples
Golang | unicode.TitleCase Constant: Here, we are going to learn about the TitleCase constant of the unicode package with its usages, syntax, and examples.
Submitted by IncludeHelp, on September 16, 2021
unicode.TitleCase Constant
The TitleCase constant is an inbuilt constant of the unicode package which is used to get the index into the delta arrays inside CaseRanges for case mapping. The value of TitleCase constant is 2.
Syntax
int unicode.TitleCase
Parameters
Return Value
The return type of the unicode.TitleCase constant is an int, it returns the index into the delta arrays inside CaseRanges for case mapping.
Example
// Golang program to demonstrate the
// example of unicode.TitleCase constant
package main
import (
"fmt"
"unicode"
)
func main() {
fmt.Printf("Value of unicode.TitleCase: %d\n",
unicode.TitleCase)
fmt.Printf("Type of unicode.TitleCase: %T\n",
unicode.TitleCase)
}
Output:
Value of unicode.TitleCase: 2
Type of unicode.TitleCase: int
Golang unicode Package »