From b6894463caede28c8bce527c343895e28026f894 Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Tue, 5 Mar 2024 22:09:22 +0000 Subject: Remove some indirection --- src/gleam_stdlib.erl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/gleam_stdlib.erl') 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). -- cgit v1.2.3