Current required packages for Debian/Ubuntu
[rofl0r-conpix.git] / Format.cpp
blobcde0915355f59bede5140176489f0037c74d5a7c
1 /*
2 * Format.cpp
4 * Created on: 05.12.2010
5 * Author: rofl
6 */
8 #include <stdarg.h>
9 #include "Format.h"
11 std::string format(std::string fmt, ...) {
12 const size_t BUF_SIZE = 1000;
13 char result[BUF_SIZE];
14 va_list ap;
15 va_start(ap, fmt);
16 vsnprintf(result, BUF_SIZE, fmt.c_str(), ap);
17 va_end(ap);
18 std::string rslt = result;
19 return rslt;