Posted on 18th September 2024|42 views
How can I concatenate two strings in Golang?
Posted on 18th September 2024| views
Use += operator to do so, try this example
package main
import "fmt"
func main() {
1str := "Welcome"
2str := "mindmajix"
1str += 2str
fmt.Println("String: ", 1str)
1str += "This is to concatinate two strings"
fmt.Println("String: ", 1str)
2str += "Portal"
fmt.Println("String: ", 2str)}