Standard library / strconv
strconv.AppendQuoteRuneToGraphic()
Appends rune literal retaining graphic Unicode to dst. Returns the expanded slice; retain it even if the initial destination has enough capacity. Expected stdout: "v='é'\n".
Formal Syntax & Structure
go syntaxgo
func AppendQuoteRuneToGraphic(dst []byte, r rune) []byteParameters & Attributes
| Name | Type | Description |
|---|---|---|
| dst | []byte | Destination byte slice; existing prefix is preserved. |
| r | rune | Unicode code point to inspect or quote. |
Return Value
[]byte
Resulting byte slice, including original prefix.
Working Example
Example Snippetgo
package main
import ( "fmt" "strconv")
func main() { b := []byte("v=") b = strconv.AppendQuoteRuneToGraphic(b, 'é') fmt.Println(string(b))}