diff options
author | Louis Pilfold <louis@lpil.uk> | 2019-10-21 19:10:08 +0100 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2019-10-25 15:13:33 +0100 |
commit | 74519318c70297b4e90b83011d353e40577f4e90 (patch) | |
tree | c6408c61d027f5b99b3f17266257332481885930 /gen/src/gleam@string.erl | |
parent | 1fd3d745cf6baa4cbaf3469f963f17fa6f5420cd (diff) | |
download | gleam_stdlib-74519318c70297b4e90b83011d353e40577f4e90.tar.gz gleam_stdlib-74519318c70297b4e90b83011d353e40577f4e90.zip |
stdlib labelled parameters
Diffstat (limited to 'gen/src/gleam@string.erl')
-rw-r--r-- | gen/src/gleam@string.erl | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gen/src/gleam@string.erl b/gen/src/gleam@string.erl index 81b6495..722ea09 100644 --- a/gen/src/gleam@string.erl +++ b/gen/src/gleam@string.erl @@ -18,16 +18,18 @@ compare(A, B) -> reverse(String) -> gleam@iodata:to_string(gleam@iodata:reverse(gleam@iodata:new(String))). -split(String, On) -> +split(X, Pattern) -> gleam@list:map( - gleam@iodata:split(gleam@iodata:new(String), On), + gleam@iodata:split(gleam@iodata:new(X), Pattern), fun gleam@iodata:to_string/1 ). -replace(String, Pattern, With) -> +replace(String, Pattern, Substitute) -> gleam@iodata:to_string( - gleam@iodata:replace(gleam@iodata:new(String), Pattern, With) + gleam@iodata:replace(gleam@iodata:new(String), Pattern, Substitute) ). -append(S1, S2) -> - gleam@iodata:to_string(gleam@iodata:append(gleam@iodata:new(S1), S2)). +append(First, Second) -> + gleam@iodata:to_string( + gleam@iodata:append(gleam@iodata:new(First), Second) + ). |