V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  lawrenceneah92  ›  全部回复第 1 页 / 共 1 页
回复总数  1
2021-01-21 09:03:40 +08:00
回复了 xdeng 创建的主题 Go 编程语言 go slice 怎么追加到头部?
imgUrl := "/group1/2021/01/20/picture001.img"
imgBytes := strings.Split(strings.Trim(imgUrl,"/"), "/")
newBytes := append([]string{"head"},imgBytes...)
fmt.Println(newBytes)
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   4371 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 21ms · UTC 05:13 · PVG 13:13 · LAX 22:13 · JFK 01:13
Developed with CodeLauncher
♥ Do have faith in what you're doing.