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 4051cf5 commit 11c4c27Copy full SHA for 11c4c27
lib/elixir/lib/string.ex
@@ -333,7 +333,7 @@ defmodule String do
333
end
334
335
336
- def rstrip(string, char) do
+ def rstrip(string, char) when is_integer(char) do
337
do_rstrip(string, "", char)
338
339
@@ -373,11 +373,11 @@ defmodule String do
373
374
@spec lstrip(t, char) :: t
375
376
- def lstrip(<<char :: utf8, rest :: binary>>, char) do
+ def lstrip(<<char :: utf8, rest :: binary>>, char) when is_integer(char) do
377
<<lstrip(rest, char) :: binary>>
378
379
380
- def lstrip(other, _char) do
+ def lstrip(other, char) when is_integer(char) do
381
other
382
383
0 commit comments