Created
July 7, 2014 03:21
-
-
Save elleryq/570b68d4282589cb019a to your computer and use it in GitHub Desktop.
Upper a string in C++
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <string> | |
| #inculde <sstream> | |
| std::string toupper(std::string& s) { | |
| for(std::string::iterator c=s.begin(); c!=s.end(); c++) { | |
| *c = std::toupper(*c); | |
| } | |
| return s; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment