summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libutil.h
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/libutil.h')
-rw-r--r--crawl-ref/source/libutil.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/crawl-ref/source/libutil.h b/crawl-ref/source/libutil.h
index 6ae7bedec4..42102991a4 100644
--- a/crawl-ref/source/libutil.h
+++ b/crawl-ref/source/libutil.h
@@ -132,6 +132,13 @@ inline std::string lowercase_first(std::string s)
return (s);
}
+inline std::string uppercase_first(std::string s)
+{
+ if (s.length())
+ s[0] = toupper(s[0]);
+ return (s);
+}
+
template <typename Z>
std::string comma_separated_line(Z start, Z end,
const std::string &andc = " and ",