Skip to content

Instantly share code, notes, and snippets.

@kolodziej
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kolodziej/2be15d2f4ff7b1986173 to your computer and use it in GitHub Desktop.
Save kolodziej/2be15d2f4ff7b1986173 to your computer and use it in GitHub Desktop.
// na początku
#include <algorithm>
#include <string>
std::string str; // w nim masz tekst
std::transform(str.begin(), std.end(), str.begin(), ::tolower);
// taki zabieg dla obu stringów i porównujesz
// jeżeli chcesz zmieniony tekst mieć w drugim stringu, to:
std::string src; // źródło
std::string dest; // cel
std::transform(src.begin(), src.end(), dest.begin(), ::tolower);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment