aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gleam/iodata.gleam8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gleam/iodata.gleam b/src/gleam/iodata.gleam
index ed993d1..264bbbe 100644
--- a/src/gleam/iodata.gleam
+++ b/src/gleam/iodata.gleam
@@ -43,14 +43,18 @@ type Direction {
external fn erl_split(Iodata, String, Direction) -> List(Iodata) =
"string" "split"
-pub fn split(iodata, on pattern) {
+pub fn split(iodata: Iodata, on pattern: String) -> List(Iodata) {
erl_split(iodata, pattern, All)
}
external fn erl_replace(Iodata, String, String, Direction) -> Iodata =
"string" "replace"
-pub fn replace(in iodata, all pattern, with substitute) {
+pub fn replace(
+ in iodata: Iodata,
+ all pattern: String,
+ with substitute: String,
+) -> Iodata {
erl_replace(iodata, pattern, substitute, All)
}