Skip to content

Ordinal sorting (byte-code based instead of locale) of the SecurityRoles struct to reduce unnessary changes to the file#316

Merged
mkholt merged 1 commit intomasterfrom
feature/generator-sorting
Mar 10, 2026
Merged

Ordinal sorting (byte-code based instead of locale) of the SecurityRoles struct to reduce unnessary changes to the file#316
mkholt merged 1 commit intomasterfrom
feature/generator-sorting

Conversation

@mkholt
Copy link
Member

@mkholt mkholt commented Mar 10, 2026

StringComparer.Ordinal compares strings byte-by-byte using their Unicode code point values, with no linguistic or culture-specific rules applied.

For example, with a culture-aware comparison, characters like Å, Ä, Ö might sort differently depending on whether the user's locale is Swedish (where they come after Z) or German (where they sort near A/O). Ordinal ignores all of that and just sorts by the raw numeric value of each character, so the result is always the same regardless of locale.

…les struct to reduce unnessary changes to the file
@mkholt mkholt merged commit 8384319 into master Mar 10, 2026
2 checks passed
@mkholt mkholt deleted the feature/generator-sorting branch March 10, 2026 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant