I know that strings are an immutable sequence of bytes, so what would be 
the most idiomatic way to handle the following operations.


   - Convert a string to []string (slice) or [n]string (array). Eg. 
   "foobar" to ["f" "o" "o" "b" "a" "r"]


   - Iterate through a string and evaluate the rune directly as a string
   
str := "foo"

for _,char := range "bar" {

                 // should concatenate a character at a time

      str += char // requires cast string(char) correct?

}


Also what is the relationship between a "rune" and the "byte" that a string 
is composed of?

If you have other advice for working with individual string "character" of 
a string for other scenarios I'd appreciate it.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to