Skip to content

Commit

Permalink
adding parse_float for consistency. closes #537.
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Mar 8, 2012
1 parent 0be57b7 commit 9ec75da
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jl/string.jl
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,9 @@ begin
end

float(x::String) = float64(x)
parse_float(x::String) = float64(x)
parse_float(::Type{Float64}, x::String) = float64(x)
parse_float(::Type{Float32}, x::String) = float32(x)

# copying a byte string (generally not needed due to "immutability")

Expand Down

0 comments on commit 9ec75da

Please sign in to comment.