Formatting.jl
Formatting.jl copied to clipboard
Documentation: .format() and related
I'm a newbie. Love the format() function and related. I haven't fully explored, but I think one point could be emphasized in the documentation: it is possible to use the dot syntax, as in format.(), to format a tuple, e.g.
format.((1.2345, 6.789), precision=2)
("1.23","6.79")
It may be obvious to most, but it wasn't to me, so it took me a little while to figure it out.
Btw, it is easier to grab from the Juno console if you wrap the lot in println
println(format.((1.2345, 6.789), precision=2))
("1.23","6.79")