Move uppercase function to strutils.
This commit is contained in:
@@ -292,6 +292,14 @@ namespace simgear {
|
|||||||
return result;
|
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 strutils
|
||||||
|
|
||||||
} // end namespace simgear
|
} // end namespace simgear
|
||||||
|
|||||||
@@ -142,6 +142,13 @@ namespace simgear {
|
|||||||
* is greater
|
* is greater
|
||||||
*/
|
*/
|
||||||
int compare_versions(const std::string& v1, const std::string& v2);
|
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 strutils
|
||||||
} // end namespace simgear
|
} // end namespace simgear
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user