We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16da928 commit 7a69a03Copy full SHA for 7a69a03
lib/elixir/lib/string.ex
@@ -463,7 +463,7 @@ defmodule String do
463
real_pos = do_length(next_grapheme(string)) - abs(position)
464
case real_pos >= 0 do
465
true -> do_at(next_grapheme(string), real_pos, 0)
466
- false -> ""
+ false -> nil
467
end
468
469
lib/elixir/test/elixir/string_test.exs
@@ -162,7 +162,7 @@ defmodule StringTest do
162
assert String.at("л", 10) == nil
163
assert String.at("elixir", -1) == "r"
164
assert String.at("がガちゃ", -2) == "ち"
165
- assert String.at("л", -3) == ""
+ assert String.at("л", -3) == nil
166
assert String.at("Ā̀stute", 1) == "s"
167
assert String.at("elixir",6) == nil
168
0 commit comments