\rst Formats arguments and returns the result as a string. **Example**:: std::string message = format("The answer is {}", 42); \endrst */
| 2114 | \endrst |
| 2115 | */ |
| 2116 | inline std::string format(StringRef format_str, ArgList args) { |
| 2117 | MemoryWriter w; |
| 2118 | w.write(format_str, args); |
| 2119 | return w.str(); |
| 2120 | } |
| 2121 | |
| 2122 | inline std::wstring format(WStringRef format_str, ArgList args) { |
| 2123 | WMemoryWriter w; |