Update samples for StringSplitOptions.TrimEntries #8598
Merged
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.
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 bothStringSplitOptions.TrimEntries
andStringSplitOptions.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.