Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,10 @@
|
|||
defmodule RC do
|
||||
def is_numeric(str) do
|
||||
case Float.parse(str) do
|
||||
{_num, ""} -> true
|
||||
_ -> false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
["123", "-12.3", "123.", ".05", "-12e5", "+123", " 123", "abc", "123a", "12.3e", "1 2"] |> Enum.filter(&RC.is_numeric/1)
|
||||
Loading…
Add table
Add a link
Reference in a new issue