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
string.Split not working as expected when using multiple string separators and StringSplitOptions.TrimEntries #73194
Considering these next C# code snippets results is the trimmed string "text", " text ".Split(',', StringSplitOptions.TrimEntries) " text ".Split(",", StringSplitOptions.TrimEntries) " text ".Split(new char[] {','}, StringSplitOptions.TrimEntries)
This next code should have the same result: " text ".Split(new string[] {","}, StringSplitOptions.TrimEntries)
The result of this last call is " text ", not trimmed.
Configuration
Dotnet version 6.0.100
OS: MacOs BigSur 11.4
Architecture: x64
Activity
jplonghi commentedon Aug 1, 2022
https://dotnetfiddle.net/m3SYKq