Skip to content
Snippets Groups Projects
Commit 1c7f229e authored by Dr. Felix Tobias Schindler's avatar Dr. Felix Tobias Schindler
Browse files

[string] add to_upper

parent 1b188bf7
No related branches found
No related tags found
No related merge requests found
......@@ -29,6 +29,14 @@ std::string to_lower(const std::string& ss)
}
std::string to_upper(const std::string& ss)
{
std::string out(ss);
std::transform(out.begin(), out.end(), out.begin(), ::toupper);
return out;
}
} // namespace Common
} // namespace XT
} // namespace Dune
......@@ -119,6 +119,15 @@ static inline std::string to_string(const T& ss, const size_t precision = defaul
std::string to_lower(const std::string& ss);
/**
* \brief Converts each character of a string to upper case using std::toupper.
* \note This might not do what you expect, given your locale.
* \sa http://en.cppreference.com/w/cpp/string/byte/tolower
* /sa ::toupper
*/
std::string to_upper(const std::string& ss);
/**
\brief Returns a string of lengths t' whitespace (or whitespace chars).
\param[in] t defines the length of the return string (after conversion to string)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment