summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2011-12-20 15:51:11 -0500
committerChris Dyer <cdyer@cs.cmu.edu>2011-12-20 15:51:11 -0500
commit2eb3bb96c6f780c477585b33273fc0c0d56c80e4 (patch)
treebe8fd2a5df3251ce8fa0a908edc0b40cc2c22e9c /utils
parent0da1f6de1b33bbff5cb99b1938bb07d050479f10 (diff)
new scorer interface is implemented, but not used
Diffstat (limited to 'utils')
-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;