[iOS] Implement IgnoreSymbols for CompreInfo in managed code#120462
Merged
matouskozak merged 15 commits intodotnet:mainfrom Oct 15, 2025
Merged
[iOS] Implement IgnoreSymbols for CompreInfo in managed code#120462matouskozak merged 15 commits intodotnet:mainfrom
matouskozak merged 15 commits intodotnet:mainfrom
Conversation
This was referenced Oct 7, 2025
Member
Author
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
tarekgh
reviewed
Oct 7, 2025
src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.iOS.cs
Show resolved
Hide resolved
This was referenced Oct 7, 2025
Open
3 tasks
Member
|
/azp run runtime-ioslike |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements support for the CompareOptions.IgnoreSymbols option in CompareInfo operations on iOS using hybrid globalization. Previously, this option was not supported on Apple platforms and would throw exceptions.
- Adds native implementation for symbol filtering in managed code for iOS
- Updates test cases to enable IgnoreSymbols tests on Apple platforms
- Modifies native enum definition to use explicit types and hex values
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/native/libs/System.Globalization.Native/pal_collation.m | Updates enum definition to use explicit int32_t type and hex values |
| src/libraries/System.Runtime/tests/System.Globalization.Tests/CompareInfo/*.cs | Removes platform-specific test exclusions and adds comprehensive IgnoreSymbols test cases |
| src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.iOS.cs | Implements IgnoreSymbols functionality with symbol filtering buffer and character categorization |
| src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.Icu.cs | Updates method signatures to use ReadOnlySpan parameters instead of raw pointers |
src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.iOS.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.iOS.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.iOS.cs
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Member
Author
|
/azp run runtime-maccatalyst,runtime-ioslikesimulator |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run runtime-maccatalyst |
|
No pipelines are associated with this pull request. |
Member
Author
|
/azp run runtime-maccatalyst |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run runtime-ioslike |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
The failures on Apple mobile are unrelated to this PR and are already known. |
tarekgh
reviewed
Oct 13, 2025
src/libraries/System.Private.CoreLib/src/System/Globalization/CompareInfo.iOS.cs
Show resolved
Hide resolved
tarekgh
approved these changes
Oct 13, 2025
Member
tarekgh
left a comment
There was a problem hiding this comment.
Added one comment/question. LGTM otherwise.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #118523.
Implementation of
CompareOptions.IgnoreSymbolsforIndexOf,IsPrefix,IsSuffix,Compareon iOS. Because ObjectiveC string APIs (https://developer.apple.com/documentation/foundation/nsstring/compareoptions?language=objc) don't provide a direct alternative toIgnoreSymbolsoption, we filter the symbols from the strings in the managed code and after returning from native, we re-calculate the original index and length.The implementation works in a following:
Fixes #111895