You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
formatcode := d | D | u | U | o | O | x | X | e | E | f | F | g | G | a | A | c | C | s | S | i | p | n
length is ignored (it was only needed for C/C++ since argument values don't have types)
Type based formatting
\%(value, arguments...) is interpolated as a call to fmt(value, arguments...).
This is especially useful when defaults have been set for the type of the first argument.
fmt_default!{T}(::Type{T}, syms::Symbol...; kwargs...) sets the defaults for a particular type.
fmt_default!(syms::Symbol...; kwargs...) sets the defaults for all types.
reset!{T}(::Type{T}) resets the defaults for a particular type.
defaultSpec(x) will return the defaults for the type of x, and
defaultSpec{T}(::Type{T}) will return the defaults for the given type.
Symbols that can currently be used are: :ljust or :left, :rjust or :right, :center, :commas, :zpad or :zeropad, and :ipre or :prefix.
Several keyword arguments can also be used:
Keyword
Type
Meaning
Default
fill
Char
Fill character
' '
align
Char
Alignment character
'\0'
sign
Char
Sign character
'-'
width
Int
Field width
-1, i.e. ignored
prec
Int
Floating Precision
-1, i.e. ignored
ipre
Bool
Use 0b, 0o, or 0x prefix?
false
zpad
Bool
Pad with 0s on left
false
tsep
Bool
Use thousands separator?
false
Python style formatting specification language
(supports most all options except for '%' currently)