julia lang - Convert/Parse Float64 into String -


i apologize if has been answered before, couldn't find far.

so how can float64 converted asciistring?

my attempts

julia> parse(5.0) error: `parse` has no method matching parse(::float64)  julia> convert(asciistring, 5.0) error: `convert` has no method matching convert(::type{asciistring}, ::float64)  in convert @ base.jl:13  julia> parsefloat(5.0) error: `parsefloat` has no method matching parsefloat(::float64) 

julia version 0.3.7

use string function:

julia> string(0.5) "0.5" 

edit:

for custom formatted strings, can use @sprintf macro:

julia> @sprintf("%.2f",0.5) "0.50"