From f2b09ca44f9448cf351093abdf50f9bb6e411423 Mon Sep 17 00:00:00 2001 From: Robert Peterson Date: Thu, 18 Apr 2019 07:38:28 -0700 Subject: Add str:append --- src/str.gleam | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/str.gleam b/src/str.gleam index 00268f8..8a7708b 100644 --- a/src/str.gleam +++ b/src/str.gleam @@ -34,6 +34,10 @@ pub fn replace(string, pattern, with) { |> iodata:to_string } +pub fn append(s1, s2) { + iodata:new(s1) |> iodata:append(_, s2) |> iodata:to_string(_) +} + pub external fn from_int(Int) -> String = "erlang" "integer_to_binary" pub external fn parse_int(String) -> Result(Int, ParseError) = "gleam__stdlib" "parse_int"; -- cgit v1.2.3