How to print rune in golang?

Hi Friends πŸ‘‹,

Welcome To aGuideHub! ❀️

Today, we will learn to create and print rune in golang, before going to the example we have to understand

What is a rune in goLang?

A rune is an int32 value, and therefore it is a Go type that is used for representing a Unicode code point. A Unicode code point or code position is a numerical value that is usually used for representing single Unicode characters;

For example, the rune literal β€˜a’ is actually the number 97.

So let’s create a rune variable and print it in golang console.

package main
import "fmt"

func main() {
  r := []rune("abc");

In the above code, we are create rune variable with value of abc and when print it so [97 98 99] in unicode of there char.

print, rune, golang

Try it yourself

All the best πŸ‘

Premium Content

You can get all the below premium content directly in your mail when you subscribe us


Interview Questions

Soon You will get CSS, JavaScript, React Js, and TypeScript So Subscribe to it.

Portfolio Template

View | Get Source Code

Cheat Sheets

Cheat Sheets Books are basically Important useful notes which we use in our day-to-day life.

Related Posts