You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
package solutions |
|
|
|
//Join the elements of the slice using the sep as glue between each element |
|
func Join(arstr []string, sep string) string { |
|
res := "" |
|
n := len(arstr) |
|
for i, a := range arstr { |
|
res += a |
|
if i < n-1 { |
|
res += sep |
|
} |
|
} |
|
return res |
|
}
|
|
|