mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Add plPrintf - a cstdio-directed version of plFormat
This commit is contained in:
@ -251,4 +251,17 @@ plString plFormat(const char *fmt_str, _Type value, _Args... args)
|
||||
return plFormat_Private::_IFormat(data, args...);
|
||||
}
|
||||
|
||||
template <typename _Type, typename... _Args>
|
||||
void plPrintf(FILE *fd, const char *fmt_str, _Type value, _Args... args)
|
||||
{
|
||||
plString output = plFormat(fmt_str, value, args...);
|
||||
fwrite(output.c_str(), sizeof(char), output.GetSize(), fd);
|
||||
}
|
||||
|
||||
template <typename _Type, typename... _Args>
|
||||
void plPrintf(const char *fmt_str, _Type value, _Args... args)
|
||||
{
|
||||
plPrintf(stdout, fmt_str, value, args...);
|
||||
}
|
||||
|
||||
#endif // plFormat_Defined
|
||||
|
Reference in New Issue
Block a user