From 0164e46d611982591d5af0c3921944a96eda4e09 Mon Sep 17 00:00:00 2001 From: Xavier Defrang Date: Sun, 5 Jun 2016 09:05:52 +0200 Subject: [PATCH 1/2] Add a reference to String.to_integer in the doc --- lib/elixir/lib/integer.ex | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/elixir/lib/integer.ex b/lib/elixir/lib/integer.ex index 1d38323d765..fa314c89c3c 100644 --- a/lib/elixir/lib/integer.ex +++ b/lib/elixir/lib/integer.ex @@ -131,6 +131,9 @@ defmodule Integer do Raises an error if `base` is less than 2 or more than 36. + If an integer formatted string wants to be directly converted to a integer, + `String.to_integer/1` or `String.to_integer/2` can be used instead. + ## Examples iex> Integer.parse("34") From d1216cd632d9e24bdb6186d5661101a7926bb86c Mon Sep 17 00:00:00 2001 From: Xavier Defrang Date: Sun, 5 Jun 2016 10:11:16 +0200 Subject: [PATCH 2/2] Improve wording by using active voice. --- lib/elixir/lib/float.ex | 2 +- lib/elixir/lib/integer.ex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/elixir/lib/float.ex b/lib/elixir/lib/float.ex index ced181ba5b8..7ec9bbc391e 100644 --- a/lib/elixir/lib/float.ex +++ b/lib/elixir/lib/float.ex @@ -15,7 +15,7 @@ defmodule Float do If the size of float exceeds the maximum size of `1.7976931348623157e+308`, the `ArgumentError` exception is raised. - If a float formatted string wants to be directly converted to a float, + If you want to convert a string-formatted float directly to a float, `String.to_float/1` can be used instead. ## Examples diff --git a/lib/elixir/lib/integer.ex b/lib/elixir/lib/integer.ex index fa314c89c3c..3f3b9387522 100644 --- a/lib/elixir/lib/integer.ex +++ b/lib/elixir/lib/integer.ex @@ -131,7 +131,7 @@ defmodule Integer do Raises an error if `base` is less than 2 or more than 36. - If an integer formatted string wants to be directly converted to a integer, + If you want to convert a string-formatted integer directly to a integer, `String.to_integer/1` or `String.to_integer/2` can be used instead. ## Examples