summaryrefslogtreecommitdiff
path: root/indra/llcommon/llformat.h
diff options
context:
space:
mode:
authorMark Lentczner <markl@lindenlab.com>2007-02-06 00:57:33 +0000
committerMark Lentczner <markl@lindenlab.com>2007-02-06 00:57:33 +0000
commitd0d4670f4941dcf7430fb1269c6613140ecf3ff7 (patch)
treee3d6b59c19cac6bc172ec5fb0131ffc8f4923b75 /indra/llcommon/llformat.h
parent77f04c74eb1603bf2fadc30127d05378bfc7a48a (diff)
merge in of error-refactor-3
concludes (fixes) SL-31187 pair programmed and reviewed by markl and karen
Diffstat (limited to 'indra/llcommon/llformat.h')
-rw-r--r--indra/llcommon/llformat.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/indra/llcommon/llformat.h b/indra/llcommon/llformat.h
new file mode 100644
index 0000000000..7079656b72
--- /dev/null
+++ b/indra/llcommon/llformat.h
@@ -0,0 +1,23 @@
+/**
+ * @file llformat.h
+ * @date January 2007
+ * @brief string formatting utility
+ *
+ * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+#ifndef LL_LLFORMAT_H
+#define LL_LLFORMAT_H
+
+#include <string>
+
+// Use as follows:
+// llinfos << llformat("Test:%d (%.2f %.2f)", idx, x, y) << llendl;
+//
+// *NOTE: buffer limited to 1024, (but vsnprintf prevents overrun)
+// should perhaps be replaced with boost::format.
+
+std::string llformat(const char *fmt, ...);
+
+#endif // LL_LLFORMAT_H