mirror of
https://github.com/glest/glest-source.git
synced 2025-08-29 19:00:07 +02:00
sort map lists non case sensitive in menu
This commit is contained in:
@@ -229,6 +229,7 @@ string ext(const string &s);
|
||||
string replaceBy(const string &s, char c1, char c2);
|
||||
vector<string> split(string s,string d);
|
||||
string toLower(const string &s);
|
||||
bool compareNonCaseSensitive(const string a, const string b);
|
||||
void copyStringToBuffer(char *buffer, int bufferSize, const string& s);
|
||||
|
||||
//numeric fcs
|
||||
|
@@ -735,6 +735,10 @@ string toLower(const string &s){
|
||||
return rs;
|
||||
}
|
||||
|
||||
bool compareNonCaseSensitive(const string a, const string b) {
|
||||
return (toLower(a) < toLower(b));
|
||||
}
|
||||
|
||||
void copyStringToBuffer(char *buffer, int bufferSize, const string& s){
|
||||
strncpy(buffer, s.c_str(), bufferSize-1);
|
||||
buffer[bufferSize-1]= '\0';
|
||||
|
Reference in New Issue
Block a user