mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
To change fewer things with the master implementation, the Id isn't changed to lower case on creation
lower case utility functions used in comparison functions
This commit is contained in:
parent
65cdd489fb
commit
d49f60d2d6
4 changed files with 22 additions and 7 deletions
|
@ -20,6 +20,16 @@ namespace Misc::StringUtils
|
|||
return std::lexicographical_compare(x.begin(), x.end(), y.begin(), y.end(), CiCharLess());
|
||||
}
|
||||
|
||||
struct CiCharMore
|
||||
{
|
||||
bool operator()(char x, char y) const { return toLower(x) > toLower(y); }
|
||||
};
|
||||
|
||||
inline bool ciMore(std::string_view x, std::string_view y)
|
||||
{
|
||||
return std::lexicographical_compare(x.begin(), x.end(), y.begin(), y.end(), CiCharMore());
|
||||
}
|
||||
|
||||
inline bool ciEqual(std::string_view x, std::string_view y)
|
||||
{
|
||||
if (std::size(x) != std::size(y))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue