Perform case insensitive search of partition types

This commit is contained in:
Gilles Moris
2019-05-15 07:33:38 +02:00
parent 522273e3db
commit f9d08a6b6b
5 changed files with 17 additions and 6 deletions

View File

@@ -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()