Perform case insensitive search of partition types
This commit is contained in:
10
support.cc
10
support.cc
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user