aboutsummaryrefslogtreecommitdiff
path: root/src/iodata.gleam
diff options
context:
space:
mode:
Diffstat (limited to 'src/iodata.gleam')
-rw-r--r--src/iodata.gleam23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/iodata.gleam b/src/iodata.gleam
new file mode 100644
index 0000000..285a99d
--- /dev/null
+++ b/src/iodata.gleam
@@ -0,0 +1,23 @@
+import any
+
+// TODO: Tests
+
+pub external type Iodata;
+
+pub external fn prepend(Iodata, String) -> Iodata =
+ 'gleam__stdlib' 'iodata_prepend';
+
+pub external fn append(Iodata, String) -> Iodata =
+ 'gleam__stdlib' 'iodata_append';
+
+pub external fn of(String) -> Iodata =
+ 'gleam__stdlib' 'identity';
+
+pub external fn from(List(String)) -> Iodata =
+ 'gleam__stdlib' 'identity';
+
+pub external fn to_string(Iodata) -> String =
+ 'erlang' 'iolist_to_binary';
+
+pub external fn byte_size(Iodata) -> Int =
+ 'erlang' 'iolist_size';