mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2024-09-09 11:07:02 +02:00
28 lines
772 B
C++
28 lines
772 B
C++
/*****************************************************************************
|
|
* Copyright (c) 2014-2018 OpenRCT2 developers
|
|
*
|
|
* For a complete list of all authors, please refer to contributors.md
|
|
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
|
|
*
|
|
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
|
*****************************************************************************/
|
|
|
|
#include "String.hpp"
|
|
|
|
#include <cstdarg>
|
|
|
|
namespace String
|
|
{
|
|
std::string Format(const char* format, ...)
|
|
{
|
|
va_list args;
|
|
char buffer[512];
|
|
|
|
va_start(args, format);
|
|
vsnprintf(buffer, sizeof(buffer), format, args);
|
|
va_end(args);
|
|
|
|
return std::string(buffer);
|
|
}
|
|
}; // namespace String
|