---
title: "+(_:_:)"
framework: swift
role: symbol
role_heading: Operator
path: "swift/string/+(_:_:)-9fm57"
---

# +(_:_:)

Creates a new collection by concatenating the elements of two collections.

## Declaration

```swift
static func + <Other>(lhs: Self, rhs: Other) -> Self where Other : RangeReplaceableCollection, Self.Element == Other.Element
```

## Parameters

- `lhs`: A range-replaceable collection.
- `rhs`: Another range-replaceable collection.

## Discussion

Discussion The two arguments must have the same Element type. For example, you can concatenate the elements of two integer arrays. let lowerNumbers = [1, 2, 3, 4] let higherNumbers: ContiguousArray = [5, 6, 7, 8, 9, 10] let allNumbers = lowerNumbers + higherNumbers print(allNumbers) // Prints "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]" The resulting collection has the type of the argument on the left-hand side. In the example above, moreNumbers has the same type as numbers, which is [Int].

## See Also

### Appending Strings and Characters

- [append(_:)](swift/string/append(_:)-4xa8f.md)
- [append(_:)](swift/string/append(_:)-4xi3j.md)
- [append(contentsOf:)](swift/string/append(contentsof:)-oxek.md)
- [append(contentsOf:)](swift/string/append(contentsof:)-9vb4t.md)
- [append(contentsOf:)](swift/string/append(contentsof:)-7est5.md)
- [append(contentsOf:)](swift/string/append(contentsof:)-9foms.md)
- [reserveCapacity(_:)](swift/string/reservecapacity(_:).md)
- [+(_:_:)](swift/string/+(_:_:).md)
- [+=(_:_:)](swift/string/+=(_:_:).md)
- [+(_:_:)](swift/string/+(_:_:)-6h59y.md)
- [+(_:_:)](swift/string/+(_:_:)-n329.md)
- [+=(_:_:)](swift/string/+=(_:_:)-676gx.md)
