Golang 字符型

Golang 字符型

Go中没有专门的字符类型,如果要存储单个字符(字母),一般使用byte来保存。

如果使用中文字符,需要使用int保存

	var a int = '你'
	var b byte = 'a'
	fmt.Printf("a = %c, b = %c", a,b)
原文地址:https://www.cnblogs.com/kikochz/p/13445745.html