You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[iOS/tvOS/MacCatalyst] String comparer for sorting numeric strings logically #109999
CompareOptions.NumericOrdering should be supported in Apple platforms. See #13979 for the approved API and discussion. PR #109861 adds the member CompareOptions.NumericOrdering but does not provide a conforming implementation for Apple platforms. The remaining work is to update the platform abstraction layer to support this.
PAL change would be to recognize the dotnet CompareOptions and convert it to the NSString.CompareOptions here
PR #109861 throws PlatformNotSupportedException when this option is used and skips tests that used this option, so when this is implemented, those guards can be removed.
Reacted by nil4
Activity
ghost added
needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area owners
Note: we rely on the stringByFoldingWithOptions native API for getting the sort key and hash code in Apple hybrid globalization, so numeric ordering can't be easily implemented for those 2 methods due to stringByFoldingWithOptions not supporting it: docs. Also, unlike the Hiragana/Katakana transformation, there doesn't seem to be a transform available for numbers so we can't work around it by preprocessing.
Note: we rely on the stringByFoldingWithOptions native API for getting the sort key and hash code in Apple hybrid globalization, so numeric ordering can't be easily implemented for those 2 methods due to stringByFoldingWithOptions not supporting it: docs. Also, unlike the Hiragana/Katakana transformation, there doesn't seem to be a transform available for numbers so we can't work around it by preprocessing.
Thank you for the initial investigation. Would you like to try implementing the NumericOrdering for the APIs where Apple provides direct support?
Activity
dotnet-policy-service commentedon Nov 20, 2024
Tagging subscribers to this area: @dotnet/area-system-globalization
See info in area-owners.md if you want to be subscribed.
dotnet-policy-service commentedon Nov 20, 2024
Tagging subscribers to 'os-tvos': @vitek-karas, @kotlarmilos, @ivanpovazan, @steveisok, @akoeplinger
See info in area-owners.md if you want to be subscribed.
dotnet-policy-service commentedon Nov 20, 2024
Tagging subscribers to 'os-ios': @vitek-karas, @kotlarmilos, @ivanpovazan, @steveisok, @akoeplinger
See info in area-owners.md if you want to be subscribed.
dotnet-policy-service commentedon Nov 20, 2024
Tagging subscribers to 'os-maccatalyst': @vitek-karas, @kotlarmilos, @ivanpovazan, @steveisok, @akoeplinger
See info in area-owners.md if you want to be subscribed.
PranavSenthilnathan commentedon Jan 12, 2025
Note: we rely on the
stringByFoldingWithOptionsnative API for getting the sort key and hash code in Apple hybrid globalization, so numeric ordering can't be easily implemented for those 2 methods due tostringByFoldingWithOptionsnot supporting it: docs. Also, unlike the Hiragana/Katakana transformation, there doesn't seem to be a transform available for numbers so we can't work around it by preprocessing.matouskozak commentedon Feb 3, 2025
Thank you for the initial investigation. Would you like to try implementing the
NumericOrderingfor the APIs where Apple provides direct support?