Skip to content

Commit 4155e18

Browse files
xavierjosevalim
authored andcommitted
Add a reference to String.to_integer in the doc (#4781)
1 parent cc69ab0 commit 4155e18

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lib/elixir/lib/float.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ defmodule Float do
1515
If the size of float exceeds the maximum size of `1.7976931348623157e+308`,
1616
the `ArgumentError` exception is raised.
1717
18-
If a float formatted string wants to be directly converted to a float,
18+
If you want to convert a string-formatted float directly to a float,
1919
`String.to_float/1` can be used instead.
2020
2121
## Examples

lib/elixir/lib/integer.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ defmodule Integer do
131131
132132
Raises an error if `base` is less than 2 or more than 36.
133133
134+
If you want to convert a string-formatted integer directly to a integer,
135+
`String.to_integer/1` or `String.to_integer/2` can be used instead.
136+
134137
## Examples
135138
136139
iex> Integer.parse("34")

0 commit comments

Comments
 (0)