在 Go 中有几种方式将 rune 类型转换为 string
1 | string('c') |
1 | c |
或者借助 strconv
包
1 | strconv.QuoteRune('c') |
1 | 'c' |
这种方式会将单引号也打印出来
最近热读
扫码关注公众号,或搜索公众号“温欣爸比”
及时获取我的最新文章
