aboutsummaryrefslogtreecommitdiff
path: root/src/gleam_stdlib.erl
diff options
context:
space:
mode:
authorErik Terpstra <erterpstra@gmail.com>2020-06-25 11:08:34 +0200
committerLouis Pilfold <louis@lpil.uk>2020-06-25 14:31:57 +0100
commit641c5050ed226ef9fc1dbbe35df579dcd2e504d3 (patch)
tree4a02f28b37979599e9556d07229178aef2b0f8cd /src/gleam_stdlib.erl
parentce82cffc8a03fed1e4421a0ba24bcd8652b48e77 (diff)
downloadgleam_stdlib-641c5050ed226ef9fc1dbbe35df579dcd2e504d3.tar.gz
gleam_stdlib-641c5050ed226ef9fc1dbbe35df579dcd2e504d3.zip
Return byte indexes
Diffstat (limited to 'src/gleam_stdlib.erl')
-rw-r--r--src/gleam_stdlib.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gleam_stdlib.erl b/src/gleam_stdlib.erl
index e89458b..217d4d1 100644
--- a/src/gleam_stdlib.erl
+++ b/src/gleam_stdlib.erl
@@ -201,7 +201,7 @@ regex_submatches(String, {S, L}) ->
end.
regex_matches(String, [{S, L} | Submatches], Number) ->
- {match, string:slice(String, S, L), S, Number,
+ {match, binary:part(String, S, L), S, Number,
lists:map(fun(X) -> regex_submatches(String, X) end, Submatches)}.
regex_captured(_, [], _) -> [];