Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update samples for StringSplitOptions.TrimEntries #8598

Merged
merged 2 commits into from
Jun 5, 2024

Conversation

poke
Copy link
Contributor

@poke poke commented Oct 30, 2022

Since I accidentally mentioned the wrong issue in another pull request, I felt obligated to fix that issue now too 😂

This PR fixes #8133 which requested additional samples for StringSplitOptions.TrimEntries. I’ve built upon the existing samples to add additional cases for both StringSplitOptions.TrimEntries and StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries. I also took the liberty to restructure the output a tiny little bit in an attempt to make the logic a bit easier to follow.

I’ve updated the snippets for all of C#, F# and VB, to continue to keep them all in sync, making them all produce exactly the same output. I wasn’t able to update the C++ sample though since I don’t have a C++/CLI environment around to test it. But the C++ sample appears to be lagging behind on the functionality anyway, so I guess it’s not that much of a problem.

Update the sample snippets for `String.Split` and `StringSplitOptions`
to include examples for the newer `StringSplitOptions.TrimEntries`
option.
@poke poke requested a review from a team as a code owner October 30, 2022 15:10
@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Oct 30, 2022
@opbld31
Copy link

opbld31 commented Oct 30, 2022

Learn Build status updates of commit e22654f:

✅ Validation status: passed

File Status Preview URL Details
snippets/csharp/System/String/Split/options.cs ✅Succeeded View
snippets/fsharp/System/String/Split/options.fs ✅Succeeded View
snippets/visualbasic/System/string.split/omit.vb ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

Copy link
Contributor

@gewarren gewarren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @poke - and sorry for the very long delay.

@gewarren gewarren closed this Jun 5, 2024
@gewarren gewarren reopened this Jun 5, 2024
Copy link

Learn Build status updates of commit e22654f:

✅ Validation status: passed

File Status Preview URL Details
snippets/csharp/System/String/Split/options.cs ✅Succeeded View
snippets/fsharp/System/String/Split/options.fs ✅Succeeded View
snippets/visualbasic/System/string.split/omit.vb ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

@gewarren gewarren enabled auto-merge (squash) June 5, 2024 22:34
Copy link

Learn Build status updates of commit b3db45f:

✅ Validation status: passed

File Status Preview URL Details
snippets/csharp/System/String/Split/options.cs ✅Succeeded View
snippets/fsharp/System/String/Split/options.fs ✅Succeeded View
snippets/visualbasic/System/string.split/limit.vb ✅Succeeded View
snippets/visualbasic/System/string.split/omit.vb ✅Succeeded View
snippets/visualbasic/System/string.split/Program.vb ✅Succeeded
snippets/visualbasic/System/string.split/string.split.vbproj ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

@gewarren gewarren merged commit e7da3ef into dotnet:main Jun 5, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Runtime community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[System.String.Split] StringSpiltOptions missing examples for .NET 5 and later
3 participants