1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-22 07:54:15 +01:00
dxvk/src/util/util_string.h
2018-08-31 05:37:34 +02:00

34 lines
689 B
C++

#pragma once
#include <string>
#include <sstream>
#include "./com/com_include.h"
namespace dxvk::str {
std::string fromws(const WCHAR *ws);
inline void format1(std::stringstream&) { }
template<typename... Tx>
void format1(std::stringstream& str, const WCHAR *arg, const Tx&... args) {
str << fromws(arg);
format1(str, args...);
}
template<typename T, typename... Tx>
void format1(std::stringstream& str, const T& arg, const Tx&... args) {
str << arg;
format1(str, args...);
}
template<typename... Args>
std::string format(const Args&... args) {
std::stringstream stream;
format1(stream, args...);
return stream.str();
}
}