mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-01 03:10:06 +00:00
Reverted File::compareFilenames() method to not compare filenames naturally and added an optional argument to use a natural comparison
This commit is contained in:
parent
fa7768ae2e
commit
d6fc589b6d
1 changed files with 3 additions and 3 deletions
|
|
@ -226,12 +226,12 @@ bool File::areFileNamesCaseSensitive()
|
|||
#endif
|
||||
}
|
||||
|
||||
static int compareFilenames (const String& name1, const String& name2) noexcept
|
||||
static int compareFilenames (const String& name1, const String& name2, bool shouldSortNaturally = false) noexcept
|
||||
{
|
||||
#if NAMES_ARE_CASE_SENSITIVE
|
||||
return name1.compareNatural (name2, true);
|
||||
return (shouldSortNaturally ? name1.compareNatural (name2, true) : name1.compare (name2));
|
||||
#else
|
||||
return name1.compareNatural (name2, false);
|
||||
return (shouldSortNaturally ? name1.compareNatural (name2, false) : name1.compareIgnoreCase (name2));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue