aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gleam/string.gleam7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gleam/string.gleam b/src/gleam/string.gleam
index 14619bf..35abb44 100644
--- a/src/gleam/string.gleam
+++ b/src/gleam/string.gleam
@@ -48,3 +48,10 @@ pub fn concat(strings: List(String)) -> String {
|> iodata.from_strings
|> iodata.to_string
}
+
+pub fn join(strings: List(String), with separator: String) -> String {
+ strings
+ |> list.intersperse(_, with: separator)
+ |> iodata.from_strings
+ |> iodata.to_string
+}