summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libutil.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/libutil.cc')
-rw-r--r--crawl-ref/source/libutil.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/crawl-ref/source/libutil.cc b/crawl-ref/source/libutil.cc
index 556365968e..30bfc1b32c 100644
--- a/crawl-ref/source/libutil.cc
+++ b/crawl-ref/source/libutil.cc
@@ -70,6 +70,19 @@ void play_sound( const char *file )
#endif
}
+std::string make_stringf(const char *s, ...)
+{
+ va_list args;
+ va_start(args, s);
+
+ char buf[400];
+ vsnprintf(buf, sizeof buf, s, args);
+
+ va_end(args);
+
+ return (buf);
+}
+
void uppercase(std::string &s)
{
/* yes, this is bad, but std::transform() has its own problems */