Skip to content

How to Join Two Strings Together in Golang

If you need to join two (2) strings together in Golang, you can do the following, using the + concatenation operator:

package main import ( "fmt") func main() { message1 := "Join Strings" message2 := "Together" result := message1 + " " + message2 fmt.Println(result) }
Code language: Go (go)

See also  Closest pair of points in linearithmic time in Java
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x