# Help finding function -- concatenate strings with separator

**URL:** https://discourse.julialang.org/t/help-finding-function-concatenate-strings-with-separator/105488
**Category:** General Usage
**Tags:** question, strings
**Created:** [October 27, 2023, 5:52pm UTC](https://discourse.julialang.org/t/help-finding-function-concatenate-strings-with-separator/105488 "2023-10-27T17:52:45Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![tbeason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbeason/32/15898_2.png) [@tbeason](https://discourse.julialang.org/u/tbeason)
#### Post date: [October 27, 2023, 5:52pm UTC](https://discourse.julialang.org/t/help-finding-function-concatenate-strings-with-separator/105488/1 "2023-10-27T17:52:45Z")

</div>

I am having trouble finding a function that I am pretty sure exists. Suppose I have a vector of strings. I want to concatenate these strings into one longer string, but with a separator in-between each. Doesn’t this function exist?

In other words, the inverse of the `split` function.

---

<div class="post-metadata">

### Author: ![jar1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jar1](https://discourse.julialang.org/u/jar1)
#### Post date: [October 27, 2023, 5:58pm UTC](https://discourse.julialang.org/t/help-finding-function-concatenate-strings-with-separator/105488/2 "2023-10-27T17:58:14Z")

</div>

```julia

  join([io::IO,] iterator [, delim [, last]])

  Join any iterator into a single string, inserting the given delimiter (if any) between adjacent items. If last is
  given, it will be used instead of delim between the last two items. Each item of iterator is converted to a
  string via print(io::IOBuffer, x). If io is given, the result is written to io rather than returned as a String.

  Examples
  ≡≡≡≡≡≡≡≡≡≡

  julia> join(["apples", "bananas", "pineapples"], ", ", " and ")
  "apples, bananas and pineapples"
  
  julia> join([1,2,3,4,5])
  "12345"

```

---

<div class="post-metadata">

### Author: ![tbeason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbeason/32/15898_2.png) [@tbeason](https://discourse.julialang.org/u/tbeason)
#### Post date: [October 27, 2023, 5:59pm UTC](https://discourse.julialang.org/t/help-finding-function-concatenate-strings-with-separator/105488/3 "2023-10-27T17:59:35Z")

</div>

Thanks. Couldn’t find it using my search terms!
