str_match: fix icase matching
This commit is contained in:
		
							parent
							
								
									6fd26d4c79
								
							
						
					
					
						commit
						0978a40372
					
				|  | @ -32,11 +32,11 @@ bool algorithm_name_matches (const std::string& search, | ||||||
| 	return true; | 	return true; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| bool matches_icase (string name, string search) | bool matches_icase (string name, string s) | ||||||
| { | { | ||||||
| 	for_each (name.begin(), name.end(), ::tolower); | 	transform (name.begin(), name.end(), name.begin(), ::tolower); | ||||||
| 	for_each (search.begin(), search.end(), ::tolower); | 	transform (s.begin(), s.end(), s.begin(), ::tolower); | ||||||
| 	return name.find (search) != name.npos; | 	return name.find (s) != name.npos; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| bool keyspec_matches (const std::string&search, | bool keyspec_matches (const std::string&search, | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue