Standard library / strings
strings.Title()
Deprecated word-title transformation; its word boundary rule does not handle Unicode punctuation correctly. Prefer a verified Unicode-aware casing library for word titles. Expected stdout: 'Hello World\n'.
Formal Syntax & Structure
go syntaxgo
func Title(s string) stringParameters & Attributes
| Name | Type | Description |
|---|---|---|
| s | string | Input text or sequence. |
Return Value
string
Deprecated word-title transformation; its word boundary rule does not handle Unicode punctuation correctly. Prefer a verified Unicode-aware casing library for word titles.
Working Example
Example Snippetgo
package main
import ( "fmt" "strings")
func main() { fmt.Println(string(strings.Title("hello world")))}