aboutsummaryrefslogtreecommitdiff
path: root/src/gleam_stdlib.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/gleam_stdlib.erl')
-rw-r--r--src/gleam_stdlib.erl3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gleam_stdlib.erl b/src/gleam_stdlib.erl
index 04b73eb..690cc34 100644
--- a/src/gleam_stdlib.erl
+++ b/src/gleam_stdlib.erl
@@ -201,8 +201,7 @@ regex_split(Regex, String) ->
re:split(String, Regex).
regex_submatches(String, {Start, Length}) ->
- Binary = unicode:characters_to_binary(String, unicode, unicode),
- BinarySlice = binary:part(Binary, {Start, Length}),
+ BinarySlice = binary:part(String, {Start, Length}),
case string:is_empty(binary_to_list(BinarySlice)) of
true -> none;
false -> {some, BinarySlice}