---
title: "joined(separator:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/unsafemutablebufferpointer/joined(separator:)-1ckou"
---

# joined(separator:)

Returns a new string by concatenating the elements of the sequence, adding the given separator between each element.

## Declaration

```swift
func joined(separator: String = "") -> String
```

## Parameters

- `separator`: A string to insert between each of the elements in this sequence. The default separator is an empty string.

## Return Value

Return Value A single, concatenated string.

## Discussion

Discussion The following example shows how an array of strings can be joined to a single, comma-separated string: let cast = ["Vivien", "Marlon", "Kim", "Karl"] let list = cast.joined(separator: ", ") print(list) // Prints "Vivien, Marlon, Kim, Karl"
