github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/website/content/docs/job-specification/hcl2/functions/string/join.mdx (about) 1 --- 2 layout: docs 3 page_title: join - Functions - Configuration Language 4 sidebar_title: join 5 description: |- 6 The join function produces a string by concatenating the elements of a list 7 with a given delimiter. 8 --- 9 10 # `join` Function 11 12 `join` produces a string by concatenating together all elements of a given 13 list of strings with the given delimiter. 14 15 ```hcl 16 join(separator, list) 17 ``` 18 19 ## Examples 20 21 ```shell-session 22 > join(", ", ["foo", "bar", "baz"]) 23 foo, bar, baz 24 > join(", ", ["foo"]) 25 foo 26 ``` 27 28 ## Related Functions 29 30 - [`split`](/docs/job-specification/hcl2/functions/string/split) performs the opposite operation: producing a list 31 by separating a single string using a given delimiter.