mirror of https://github.com/AxioDL/metaforce.git
Add WideFormat function
This commit is contained in:
parent
879cbc3fe1
commit
d5d9004dab
|
@ -425,6 +425,16 @@ static inline std::string Format(const char* format, ...)
|
||||||
return std::string(resultBuf, printSz);
|
return std::string(resultBuf, printSz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline std::wstring WideFormat(const wchar_t* format, ...)
|
||||||
|
{
|
||||||
|
wchar_t resultBuf[FORMAT_BUF_SZ];
|
||||||
|
va_list va;
|
||||||
|
va_start(va, format);
|
||||||
|
int printSz = vswprintf(resultBuf, FORMAT_BUF_SZ, format, va);
|
||||||
|
va_end(va);
|
||||||
|
return std::wstring(resultBuf, printSz);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline bool CheckFreeSpace(const SystemChar* path, size_t reqSz)
|
static inline bool CheckFreeSpace(const SystemChar* path, size_t reqSz)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue