summaryrefslogtreecommitdiff
path: root/utils/stringlib.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/stringlib.h')
-rw-r--r--utils/stringlib.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/utils/stringlib.h b/utils/stringlib.h
index cafbdac3..f457e1e4 100644
--- a/utils/stringlib.h
+++ b/utils/stringlib.h
@@ -125,6 +125,13 @@ inline std::string LowercaseString(const std::string& in) {
return res;
}
+inline std::string UppercaseString(const std::string& in) {
+ std::string res(in.size(),' ');
+ for (int i = 0; i < in.size(); ++i)
+ res[i] = toupper(in[i]);
+ return res;
+}
+
inline int CountSubstrings(const std::string& str, const std::string& sub) {
size_t p = 0;
int res = 0;