We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7bab90e commit 9c5f54aCopy full SHA for 9c5f54a
doc/syntax.rst
@@ -365,6 +365,11 @@ Replacing ``%x`` and ``%o`` and converting the value to different bases::
365
format("int: {0:d}; hex: {0:#x}; oct: {0:#o}; bin: {0:#b}", 42);
366
// Result: "int: 42; hex: 0x2a; oct: 052; bin: 0b101010"
367
368
+Padded hex byte with prefix and always prints both hex characters::
369
+
370
+ format("{:#04x}", 0);
371
+ // Result: "0x00"
372
373
.. ifconfig:: False
374
375
Using the comma as a thousands separator::
0 commit comments