Skip to content

Commit 9ec75da

Browse files
committed
adding parse_float for consistency. closes #537.
1 parent 0be57b7 commit 9ec75da

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

jl/string.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -980,6 +980,9 @@ begin
980980
end
981981

982982
float(x::String) = float64(x)
983+
parse_float(x::String) = float64(x)
984+
parse_float(::Type{Float64}, x::String) = float64(x)
985+
parse_float(::Type{Float32}, x::String) = float32(x)
983986

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

0 commit comments

Comments
 (0)