diff options
author | Louis Pilfold <louis@lpil.uk> | 2020-01-13 21:58:40 +0000 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2020-01-13 22:39:29 +0000 |
commit | 071cb05a8b3d6d906fdbcc8e31f2855a08949fa9 (patch) | |
tree | 930551d8182b3688cdbb18b4ac198e9f1c42c178 | |
parent | f3208d32e37d1142c19014bd9d9d940d2938113c (diff) | |
download | gleam_stdlib-071cb05a8b3d6d906fdbcc8e31f2855a08949fa9.tar.gz gleam_stdlib-071cb05a8b3d6d906fdbcc8e31f2855a08949fa9.zip |
Type annotations for gleam/iodata
-rw-r--r-- | src/gleam/iodata.gleam | 8 |
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) } |