VOOZH about

URL: https://www.geeksforgeeks.org/go-language/strings-join-function-in-golang-with-examples/

⇱ strings.Join() Function in Golang With Examples - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

strings.Join() Function in Golang With Examples

Last Updated : 10 May, 2020
strings.Join() Function in Golang concatenates all the elements present in the slice of string into a single string. This function is available in the string package. Syntax:
func Join(s []string, sep string) string
Here, s is the string from which we can concatenate elements and sep is the separator which is placed between the elements in the final string. Return Value: It returns a string. Example 1:
Output:
Geeks-For-Geeks
Example 2:
Output:
A Computer-science portal for Geeks
Comment
Article Tags:

Explore