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
Copy file name to clipboardExpand all lines: README.md
+29-4
Original file line number
Diff line number
Diff line change
@@ -40,11 +40,36 @@ This is especially useful when defaults have been set for the type of the first
40
40
*`fmt_default!{T}(::Type{T}, syms::Symbol...; kwargs...)` sets the defaults for a particular type.
41
41
*`fmt_default!(syms::Symbol...; kwargs...)` sets the defaults for all types.
42
42
43
-
Symbols that can currently be used are: `:ljust` or `:left`, `:rjust` or `:right`, `:commas`, `:zpad` or `:zeropad`, and `:ipre` or `:prefix`.
43
+
Symbols that can currently be used are: `:ljust` or `:left`, `:rjust` or `:right`, `:center`, `:commas`, `:zpad` or `:zeropad`, and `:ipre` or `:prefix`.
prec | Int | Floating Precision | -1, i.e. ignored
52
+
ipre | Bool | Use 0b, 0o, or 0x prefix? | false
53
+
zpad | Bool | Pad with 0s on left | false
54
+
tsep | Bool | Use thousands separator? | false
55
+
44
56
*`reset!{T}(::Type{T})` resets the defaults for a particular type.
45
57
*`defaultSpec(x)` will return the defaults for the type of x, and
46
58
*`defaultSpec{T}(::Type{T})` will return the defaults for the given type.
47
59
48
-
There is currently support for Python style formatting, although that is a work-in-progress,
49
-
and I am intending to improve the syntax to make it as close as possible to Python's 3.6 format strings.
50
-
Currently, the syntax is `\{<formatstring>}(expression)`, however I plan on changing it shortly to `\{expression}` (equivalent to `pyfmt("", expression)`, and `\{expression;formatstring}` (equivalent to `pyfmt("formatstring", expression)`.
60
+
There is also support for Python style formatting, which supports most options (except for '%' currently).
0 commit comments