Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/libraries/System.Private.Uri/src/System/Uri.cs')
-rw-r--r--src/libraries/System.Private.Uri/src/System/Uri.cs7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/libraries/System.Private.Uri/src/System/Uri.cs b/src/libraries/System.Private.Uri/src/System/Uri.cs
index 634f4cf2eab..b24d4592da5 100644
--- a/src/libraries/System.Private.Uri/src/System/Uri.cs
+++ b/src/libraries/System.Private.Uri/src/System/Uri.cs
@@ -1035,12 +1035,7 @@ namespace System
// Plus going through Compress will turn them into / anyway
// Converting / back into \
Span<char> slashSpan = result.AsSpan(0, count);
- int slashPos;
- while ((slashPos = slashSpan.IndexOf('/')) >= 0)
- {
- slashSpan[slashPos] = '\\';
- slashSpan = slashSpan.Slice(slashPos + 1);
- }
+ slashSpan.Replace('/', '\\');
return new string(result, 0, count);
}