Created
July 23, 2020 14:52
-
-
Save gcnyin/37e08382f47c16e41386d72bd16e5ca1 to your computer and use it in GitHub Desktop.
c++ tolower command line tool
This file contains 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 <algorithm> | |
#include <cctype> | |
#include <iostream> | |
#include <string> | |
using namespace std; | |
int main(int argc, char *argv[]) { | |
if (argc < 2) { | |
exit(1); | |
} | |
string input = argv[1]; | |
transform(input.begin(), input.end(), input.begin(), towlower); | |
cout << input << endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment