相关疑难解决方法(0)

如何在Go中将int值转换为字符串?

i := 123
s := string(i) 
Run Code Online (Sandbox Code Playgroud)

s是'E',但我想要的是"123"

请告诉我如何获得"123".

在Java中,我可以这样做:

String s = "ab" + "c"  // s is "abc"
Run Code Online (Sandbox Code Playgroud)

我怎么能concat在Go中使用两个字符串?

string int go converters

447
推荐指数
9
解决办法
33万
查看次数

标签 统计

converters ×1

go ×1

int ×1

string ×1