Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add string.Contains shims for .NET Standard 2.0 - #119957

#119957
Closed
xtqqczze wants to merge 1 commit into
dotnet:maindotnet/runtime:mainfrom
xtqqczze:shim-stringcontainsxtqqczze/dotnet-runtime:shim-stringcontainsCopy head branch name to clipboard
Closed

Add string.Contains shims for .NET Standard 2.0#119957
xtqqczze wants to merge 1 commit into
dotnet:maindotnet/runtime:mainfrom
xtqqczze:shim-stringcontainsxtqqczze/dotnet-runtime:shim-stringcontainsCopy head branch name to clipboard

Conversation

@xtqqczze

@xtqqczze xtqqczze commented Sep 22, 2025

Copy link
Copy Markdown
Contributor

@xtqqczze
xtqqczze marked this pull request as draft September 22, 2025 14:27
@github-actions github-actions Bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Sep 22, 2025
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Sep 22, 2025
@MihaZupan

MihaZupan commented Sep 22, 2025

Copy link
Copy Markdown
Member

#119673 is also adding framework polyfills for new APIs.

My preference would be to get that reviewed first, so that we can use a common switch of including such helper files in projects.

I also had changes for Encoding and Span.Contains APIs sitting in a branch since they depend on the PR mentioned above being merged first:

@MihaZupan

Copy link
Copy Markdown
Member

@xtqqczze Do you think it's worth moving forward here given that MihaZupan@e819ccb already has a superset of these changes?

@xtqqczze

xtqqczze commented Sep 22, 2025

Copy link
Copy Markdown
Contributor Author

@xtqqczze Do you think it's worth moving forward here given that MihaZupan@e819ccb already has a superset of these changes?

I don't see string.Contains methods in those changes, only ReadOnlySpan<T>.Contains. Looks like it touches many of the same files though.

* Use C# 14 extension members to polyfill the required APIs
* Remove suppression of CA2249: Consider using 'string.Contains' instead of 'string.IndexOf'
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Draft Pull Request was automatically closed for 30 days of inactivity. Please let us know if you'd like to reopen it.

@github-actions github-actions Bot locked and limited conversation to collaborators Nov 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

community-contribution Indicates that the PR has been added by a community member needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.