Standard library / strconv
strconv.QuoteRuneToGraphic()
Returns a single-quoted Go rune literal retaining graphic Unicode runes where possible. Expected stdout: "'é'\n".
Formal Syntax & Structure
go syntaxgo
func QuoteRuneToGraphic(r rune) stringParameters & Attributes
| Name | Type | Description |
|---|---|---|
| r | rune | Unicode code point to inspect or quote. |
Return Value
string
Encoded representation.
Working Example
Example Snippetgo
package main
import ( "fmt" "strconv")
func main() { fmt.Println(strconv.QuoteRuneToGraphic('é'))}