Concat Strings Golang Code Example


Example: concatenate a string in golang


// Creating and initializing strings 
// Using shorthand declaration
str3 := "Geeks"
str4 := "Geeks"

// Concatenating strings
// Using + operator
result := str3 + "for" + str4

fmt.Println("New string 2: ", result)

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable