In C++20 you will be able to use std::format
.
This will support python style formatting:
string s = std::format("{1} to {0}", "a", "b");
There is already an implementation available: https://github.com/fmtlib/fmt.
More Related Contents:
- How to Calculate the sample mean, standard deviation, and variance in C++ from random distributed data and compare with original mean and sigma
- C++ convert hex string to signed integer
- What is the easiest way to initialize a std::vector with hardcoded elements?
- Extracting text OpenCV
- C99 stdint.h header and MS Visual Studio
- Initializing a static std::map in C++
- Parse (split) a string in C++ using string delimiter (standard C++)
- Array index out of bound behavior
- Does C++ limit recursion depth?
- Is sizeof in C++ evaluated at compilation time or run time?
- In C++ is there a way to go to a specific line in a text file?
- Building glew on windows with mingw
- Weird behavior of right shift operator (1 >> 32)
- How does std::move() transfer values into RValues?
- Type erasing type erasure, `any` questions?
- MinGW linker error: winsock
- Why is sizeof(std::string) only eight bytes?
- Why doesn’t left bit shift
- What is the difference between a concrete class and an abstract class?
- Handling partial return from recv() TCP in C
- Dijkstra Shortest Path with VertexList = ListS in boost graph
- How can I have multiple parameter packs in a variadic template?
- Fastest way to get a positive modulo in C/C++
- Calling assignment operator in copy constructor
- How can I make the map::find operation case insensitive?
- Specialization of ‘template struct std::less’ in different namespace
- Chaining iterators for C++
- rc.exe no longer found in VS 2015 Command Prompt
- Multiple “could not be resolved” problems using Eclipse with minGW
- Where ampersand “&” can be put when passing argument by reference?