function format( x::T;
width::Int=-1,
precision::Int= -1,
leftjustified::Bool=false,
zeropadding::Bool=false, # when right-justified, use 0 instead of space to fill
commas::Bool=false,
signed::Bool=false, # +/- prefix
positivespace::Bool=false,
stripzeros::Bool=(precision== -1),
parens::Bool=false, # use (1.00) instead of -1.00. Used in finance
alternative::Bool=false, # usually for hex
mixedfraction::Bool=false,
mixedfractionsep::UTF8Str="_",
fractionsep::UTF8Str="/", # num / den
fractionwidth::Int = 0,
tryden::Int = 0, # if 2 or higher,
# try to use this denominator, without losing precision
suffix::UTF8Str="", # useful for units/%
autoscale::Symbol=:none, # :metric, :binary or :finance
conversion::ASCIIStr=""
) where {T<:Real}
several of the parameters are either UTF8Str or ASCIIStr, but this fails when the parameter passed in is a SubString{T}. This seemed to work with Formatting.jl
In format:
several of the parameters are either UTF8Str or ASCIIStr, but this fails when the parameter passed in is a
SubString{T}
. This seemed to work with Formatting.jl