aboutsummaryrefslogtreecommitdiff
path: root/src/gleam_stdlib.erl
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2024-03-05 22:09:22 +0000
committerLouis Pilfold <louis@lpil.uk>2024-03-05 22:09:22 +0000
commitb6894463caede28c8bce527c343895e28026f894 (patch)
tree9221ac307226a49fa7b892db947e8d1727bfb5aa /src/gleam_stdlib.erl
parent15af4b029e9240396c15e276c6bc53f31b1a576b (diff)
downloadgleam_stdlib-b6894463caede28c8bce527c343895e28026f894.tar.gz
gleam_stdlib-b6894463caede28c8bce527c343895e28026f894.zip
Remove some indirection
Diffstat (limited to 'src/gleam_stdlib.erl')
-rw-r--r--src/gleam_stdlib.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gleam_stdlib.erl b/src/gleam_stdlib.erl
index 433b4d4..a308f3e 100644
--- a/src/gleam_stdlib.erl
+++ b/src/gleam_stdlib.erl
@@ -13,7 +13,7 @@
decode_tuple5/1, decode_tuple6/1, tuple_get/2, classify_dynamic/1, print/1,
println/1, print_error/1, println_error/1, inspect/1, float_to_string/1,
int_from_base_string/2, utf_codepoint_list_to_string/1, contains_string/2,
- crop_string/2, base16_decode/1
+ crop_string/2, base16_decode/1, string_replace/3
]).
%% Taken from OTP's uri_string module
@@ -527,3 +527,6 @@ base16_decode(String) ->
catch
_:_ -> {error, nil}
end.
+
+string_replace(String, Pattern, Replacement) ->
+ string:replace(String, Pattern, Replacement, all).