Go文字列strings.Join

elemsの要素をsepで連結した文字列を返します。

문법

strings.Join(elems []string, sep string) string

예제

아래 값을 입력하면 예제에 즉시 반영됩니다.

words
string
fmt
Println
strings
Hello
World
Go
words := []string{"Hello", "World", "Go"}
fmt.Println(strings.Join(words, " ")) // Hello World Go