How to use strconv.QuoteRuneToASCII() Function in Golang? Last Updated : 03 May, 2020 Comments Improve Suggest changes Like Article Like Report Go language provides inbuilt support to implement conversions to and from string representations of basic data types by strconv Package. This package provides a QuoteRuneToASCII() function which is used to find a single-quoted Go string literal representing rune and the returned string uses Go escape sequences (\t, \n, \xFF, \u0100) to non-ASCII characters and non-printable characters defined by IsPrint. To access QuoteRuneToASCII() function you need to import strconv Package in your program with the help of import keyword. Syntax: func QuoteRuneToASCII(rn rune) string Parameter: This function takes one parameter of rune type, i.e., rn. Return value: This function returns a single-quoted Go string literal which represents rune. Let us discuss this concept with the help of the given examples: Example 1: // Golang program to illustrate // strconv.QuoteRuneToASCII() Function package main import ( "fmt" "strconv" ) func main() { // Finding a single-quoted Go // string literal representing rune // Using QuoteRuneToASCII() function r := strconv.QuoteRuneToASCII('♥') fmt.Println (r) } Output: '\u2665' Example 2: // Golang program to illustrate // strconv.QuoteRuneToASCII() Function package main import ( "fmt" "strconv" ) func main() { // Finding a single-quoted Go // string literal representing rune // Using QuoteRuneToASCII() function val1 := strconv.QuoteRuneToASCII('♣') fmt.Println("Result 1: ", val1) fmt.Println("Length 1: ", len(val1)) val2 := strconv.QuoteRuneToASCII('→') fmt.Println("Result 2: ", val2) fmt.Println("Length 2: ", len(val2)) } Output: Result 1: '\u2663' Length 1: 8 Result 2: '\u2192' Length 2: 8 Comment More infoAdvertise with us Next Article ASCII Value of a Character in C A ankita_saini Follow Improve Article Tags : Go Language ASCII Golang-strconv Similar Reads ASCII Values Alphabets ( A-Z, a-z & Special Character Table ) ASCII (American Standard Code for Information Interchange) is a standard character encoding used in telecommunication. The ASCII pronounced 'ask-ee', is strictly a seven-bit code based on the English alphabet. ASCII codes are used to represent alphanumeric data. The code was first published as a sta 7 min read Go Tutorial Go or you say Golang is a procedural and statically typed programming language having the syntax similar to C programming language. It was developed in 2007 by Robert Griesemer, Rob Pike, and Ken Thompson at Google but launched in 2009 as an open-source programming language and mainly used in Google 2 min read Program to print ASCII Value of a character Given a character, we need to print its ASCII value in C/C++/Java/Python. Examples : Input : a Output : 97 Input : DOutput : 68 Here are few methods in different programming languages to print ASCII value of a given character : Python code using ord function : ord() : It converts the given string o 4 min read Go Programming Language (Introduction) Go is a procedural programming language. It was developed in 2007 by Robert Griesemer, Rob Pike, and Ken Thompson at Google but launched in 2009 as an open-source programming language. Programs are assembled by using packages, for efficient management of dependencies. This language also supports env 11 min read ASCII Value of a Character in C In this article, we will discuss about the ASCII values that are bit numbers used to represent the character in the C programming language. We will also discuss why the ASCII values are needed and how to find the ASCII value of a given character in a C program.Table of ContentWhat is ASCII Value of 4 min read time.Sleep() Function in Golang With Examples In Go language, time packages supplies functionality for determining as well as viewing time. The Sleep() function in Go language is used to stop the latest go-routine for at least the stated duration d. And a negative or zero duration of sleep will cause this method to return instantly. Moreover, t 3 min read Golang Tutorial - Learn Go Programming Language This Golang tutorial provides you with all the insights into Go Language programming, Here we provide the basics, from how to install Golang to advanced concepts of Go programming with stable examples. So, if you are a professional and a beginner, this free Golang tutorial is the best place for your 10 min read Java Program to Print the ASCII Value ASCII is an acronym that stands for American Standard Code for Information Interchange. In this, a specific numerical value is assigned to different characters and symbols, it is a 7-bit character set containing 128 (0-127), for computers to store and manipulate, and while storing and manipulating t 5 min read Top 10 Golang Project Ideas with Source Code in 2025 Golang, or Go, a programming language was created by Google. It's widely used for building different kinds of applications like websites and cloud services. The fastest way to master this language is by building projects related to it. This article introduces 10 beginner-friendly to medium-difficult 8 min read Interfaces in Golang In Go, an interface is a type that lists methods without providing their code. You canât create an instance of an interface directly, but you can make a variable of the interface type to store any value that has the needed methods.Exampletype Shape interface { Area() float64 Perimeter() float64}In t 3 min read Like