Horje
golang converts string to rune slice Code Example
golang converts string to rune slice
Golang program that converts string to rune slice

package main

import "fmt"

func main() {
    // An example string.
    value := "cat"
    fmt.Println(value)

    // Convert string into a slice of runes.
    slice := []rune(value)
    fmt.Println(slice)

    // Convert rune slice into a string.
    original := string(slice)
    fmt.Println(original)
}

Output

cat
[99 97 116]
cat




Go

Related
run go file from terminal Code Example run go file from terminal Code Example
golang read large file Code Example golang read large file Code Example
golang http writer redirect Code Example golang http writer redirect Code Example
Multiple return types in golang Code Example Multiple return types in golang Code Example
using golang to make api calls Code Example using golang to make api calls Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7