sprintf_numeric

September 14, 2025 ยท View on GitHub

Shows how to use xtd::string::sprintf method.

Sources

  • src/sprintf_numeric.cpp
  • CMakeLists.txt

Build and run

Open "Command Prompt" or "Terminal". Navigate to the folder that contains the project and type the following:

xtdc run

Output (with colors)

42
0b00101010
0b00101010
\$42.00
\$42.00
42
42
4.200000e+01
4.200000E+01
42.00
42.00
42
42
052
052
42.00
42.00
4200.00 %
4200.00 %
0x002a
0x002A

Contents

  1. 1Sources
  2. 2Build and run