Golang fmt.Sprint() function example
package fmt
Sprint formats using the default formats for its operands and returns the resulting string. Spaces are added between operands when neither is a string.
Golang fmt.Sprint() function usage example
package main
import "fmt"
func main() {
chinese := "你好"
english := "Hello"
malay := "apa khabar"
concatenated := fmt.Sprint(chinese +" "+ english +" "+ malay)
fmt.Println(concatenated)
}
Output :
你好 Hello apa khabar
Reference :
Advertisement
Something interesting
Tutorials
+4.7k Adding Skype actions such as call and chat into web page examples
+15.3k nginx: [emerg] unknown directive "ssl"
+11k Golang : Replace a parameter's value inside a configuration file example
+62.7k Golang : Convert HTTP Response body to string
+6.6k Golang : How to determine if request or crawl is from Google robots
+6.9k Golang : Normalize email to prevent multiple signups example
+10.6k Golang : Flip coin example
+8.1k Golang : Multiplexer with net/http and map
+16k Golang : How to reverse elements order in map ?
+44.9k Golang : Use wildcard patterns with filepath.Glob() example
+12.7k Golang : zlib compress file example