elixir-lang/elixir — pull request #1044 by jdeisenberg (2013-05-10 18:48:59+00:00)
Title: String.to_integer and String.to_float

Implement String.to_integer/1 and String.to_float/1. A successful conversion returns a tuple in the form {value, remainder} where remainder is the part of the string following the valid number. An unsuccessful conversion returns :error.

Unlike Erlang's :string.to_float/1 function, String.to_float/1 will accept an integer as valid and return it as an integer value.