# Convert array to string and separate each element with underscore

**URL:** https://discourse.julialang.org/t/convert-array-to-string-and-separate-each-element-with-underscore/97452
**Category:** General Usage
**Tags:** strings
**Created:** [April 13, 2023, 9:53pm UTC](https://discourse.julialang.org/t/convert-array-to-string-and-separate-each-element-with-underscore/97452 "2023-04-13T21:53:24Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jianqixi](https://avatars.discourse-cdn.com/v4/letter/j/3be4f8/32.png) [@jianqixi](https://discourse.julialang.org/u/jianqixi)
#### Post date: [April 13, 2023, 9:53pm UTC](https://discourse.julialang.org/t/convert-array-to-string-and-separate-each-element-with-underscore/97452/1 "2023-04-13T21:53:24Z")

</div>

Hi I am trying to convert one array, like A=[“a”, “b”, “c”] into one string, like str=“a\_b\_c”. I am wondering, in Julia, how can we get it. Thanks

---

<div class="post-metadata">

### Author: ![adienes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adienes/32/37459_2.png) [@adienes](https://discourse.julialang.org/u/adienes)
#### Post date: [April 13, 2023, 9:54pm UTC](https://discourse.julialang.org/t/convert-array-to-string-and-separate-each-element-with-underscore/97452/2 "2023-04-13T21:54:28Z")

</div>

`join(A, "_")`

---

<div class="post-metadata">

### Author: ![jianqixi](https://avatars.discourse-cdn.com/v4/letter/j/3be4f8/32.png) [@jianqixi](https://discourse.julialang.org/u/jianqixi)
#### Post date: [April 13, 2023, 9:54pm UTC](https://discourse.julialang.org/t/convert-array-to-string-and-separate-each-element-with-underscore/97452/3 "2023-04-13T21:54:52Z")

</div>

Thank you!
