--- /dev/null
+/* $Id$
+
+This file is part of gldbg
+Copyright © 2011 Mikko Rasa, Mikkosoft Productions
+Distributed under the GPL
+*/
+
+#include <stdio.h>
+#include <stdarg.h>
+#include "strformat.h"
+
+using namespace std;
+
+string strformat(const char *fmt, ...)
+{
+ va_list args;
+ va_start(args, fmt);
+ char buf[2048];
+ vsnprintf(buf, sizeof(buf), fmt, args);
+ va_end(args);
+ return buf;
+}