In Golang, how to convert a string to unicode rune array and back?

In Golang, how to convert a string to unicode rune array and do the reverse way?

asked Aug 4, 2016 by anonymous

1 Answer

Convert string s to a rune array:

runes := []rune(s)

Convert a rune array runes to string:

str := string(runes)
answered Oct 10, 2016 by Eric Z Ma (44,280 points)

Please log in or register to answer this question.

Related questions

1 answer
1 answer
1 answer
1 answer
0 answers
1 answer
1 answer
asked Aug 3, 2016 by anonymous
Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...