Move uppercase function to strutils.

This commit is contained in:
ThorstenB
2012-10-10 21:31:57 +02:00
parent 81d5b651d2
commit 1ff3a61de6
2 changed files with 15 additions and 0 deletions

View File

@@ -292,6 +292,14 @@ namespace simgear {
return result;
}
string uppercase(const string &s) {
string rslt(s);
for(string::iterator p = rslt.begin(); p != rslt.end(); p++){
*p = toupper(*p);
}
return rslt;
}
} // end namespace strutils
} // end namespace simgear

View File

@@ -142,6 +142,13 @@ namespace simgear {
* is greater
*/
int compare_versions(const std::string& v1, const std::string& v2);
/**
* Convert a string to upper case.
* @return upper case string
*/
std::string uppercase(const std::string &s);
} // end namespace strutils
} // end namespace simgear