Make sort by name functionality culture-specific to be more accurately alphabetical

This commit is contained in:
pointfeev 2024-07-22 03:12:27 -04:00
parent 25f626aa29
commit 97f14a8dba

View file

@ -22,7 +22,7 @@ internal sealed class StringComparer : IComparer<string>
{ {
public int Compare(string a, string b) public int Compare(string a, string b)
=> !int.TryParse(a, out _) && !int.TryParse(b, out _) => !int.TryParse(a, out _) && !int.TryParse(b, out _)
? string.Compare(a, b, StringComparison.Ordinal) ? string.Compare(a, b, StringComparison.CurrentCulture)
: !int.TryParse(a, out int A) : !int.TryParse(a, out int A)
? 1 ? 1
: !int.TryParse(b, out int B) : !int.TryParse(b, out int B)