http://play.golang.org/p/BoZkHC8_uA
我想把uint8转换成字符串,但不知道怎么转换。
package main
import "fmt"
import "strconv"
func main() {
str := "Hello"
fmt.Println(str[1]) // 101
fmt.Println(strconv.Itoa(str[1]))
}
这给了我 prog.go:11: cannot use str[1] (type uint8) as type int in function argument
[process exited with non-zero status]
有其他任何想法吗?