We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3dc949 commit e986edeCopy full SHA for e986ede
cpp-strings/cppstrings.h
@@ -723,6 +723,15 @@ namespace pcs // i.e. "pythonic c++ strings"
723
}
724
725
726
+ //--- format() ----------------------------------------
727
+ /** Formats this string according to c++20 std::format() specification. Returns it (may be discarded). */
728
+ template<class... ArgsT>
729
+ inline CppStringT format(const std::format_string<ArgsT...> frmt, ArgsT&&... args)
730
+ {
731
+ return *this = std::vformat(frmt.get(), std::make_format_args(args...));
732
+ }
733
+
734
735
//--- index() -----------------------------------------
736
/** Like find(const CppStringT&), but raises NotFoundException when the substring sub is not found.
737
*
0 commit comments