gpt4 book ai didi

go - 在 golang 中加入字符串

转载 作者:IT王子 更新时间:2023-10-29 02:27:50 25 4
gpt4 key购买 nike

为什么这些代码的输出不同?

fmt.Println(Join([]string{"name=xxx", string(127)}, "&"))

output name=xxx&

fmt.Println(Join([]string{"name=xxx", "127"}, "&"))

output name=xxx&127

任何帮助!

最佳答案

string(127)表示编码为127的字符,不可打印。使用 strconv

关于go - 在 golang 中加入字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32621893/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com