repo.or.cz
/
rofl0r-conpix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Current required packages for Debian/Ubuntu
[rofl0r-conpix.git]
/
Format.cpp
blob
cde0915355f59bede5140176489f0037c74d5a7c
1
/*
2
* Format.cpp
3
*
4
* Created on: 05.12.2010
5
* Author: rofl
6
*/
7
8
#include <stdarg.h>
9
#include
"Format.h"
10
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
;
20
}