From 5bf165463c86aedbba37371f83c2fed6bca0d07b Mon Sep 17 00:00:00 2001 From: "an.tsouchlos" Date: Wed, 9 Feb 2022 16:31:45 +0000 Subject: [PATCH] Created README --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..06685ef --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# const_fmt + +An extremely lightweight library, intentionally resembling `fmtlib` as much as possible. This is achieved by moving +as much of the formatting process as possible to compile time. + +Meant for systems with very few resources, such as embedded systems. + +## Overview + +During compile-time, the string to be formatted is preprocessed to the point, only the actual values to be formatted +have to be written (If they are not available at compile time). + +For example `One number: {:08}; And another one: {:05.3}` is preprocessed into `One number: 000; And another one: 00.000`. +This is returned as a `std::array`, where `N` is automatically evaluated. The only code executed at compile +time then formats the numbers and writes them into their place in the array. + +Disclaimer: The actual formatting code is largely shamelessly stolen from `fmtlib`. \ No newline at end of file