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

Convert string s to a rune array:

runes := []rune(s)

Convert a rune array runes to string:

str := string(runes)

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *