Standard library / bytes
bytes.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 []byte) []byteParameters & Attributes
| Name | Type | Description |
|---|---|---|
| s | []byte | Input text or sequence. |
Return Value
[]byte
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 ( "bytes" "fmt")
func main() { fmt.Println(string(bytes.Title([]byte("hello world"))))}