summaryrefslogtreecommitdiff
path: root/indra/llcommon/llformat.cpp
blob: 0c2a6d3b1e27655498e3e399da596d38783f2352 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/** 
 * @file llformat.cpp
 * @date   January 2007
 * @brief string formatting utility
 *
 * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
 * $License$
 */

#include "linden_common.h"

#include "llformat.h"

#include <stdarg.h>

std::string llformat(const char *fmt, ...)
{
	char tstr[1024];	/* Flawfinder: ignore */
	va_list va;
	va_start(va, fmt);
#if LL_WINDOWS
	_vsnprintf(tstr, 1024, fmt, va);
#else
	vsnprintf(tstr, 1024, fmt, va);	/* Flawfinder: ignore */
#endif
	va_end(va);
	return std::string(tstr);
}