diff options
Diffstat (limited to 'support.cc')
-rw-r--r-- | support.cc | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -16,6 +16,8 @@ #include <string.h> #include <sys/stat.h> #include <string> +#include <cctype> +#include <algorithm> #include <iostream> #include <sstream> #include "support.h" @@ -357,3 +359,11 @@ void WinWarning(void) { exit(0); #endif } // WinWarning() + +// Returns the input string in lower case +string ToLower(const string& input) { + string lower = input; // allocate correct size through copy + + transform(input.begin(), input.end(), lower.begin(), ::tolower); + return lower; +} // ToLower() |