This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up Uri.UnescapeDataString (#42225)
- Use string.IndexOf rather than an open-coded, unsafe loop. - Avoid an unnecessary SequenceEquals at the end: we're only at this point if a `%` was found highlighting that something escaped was found. - Use stack memory for smaller inputs if possible, to avoid unnecessary ArrayPool interaction - Remove an unnecessary argument to a helper function. - Fix ValueStringBuilder.Grow to only copy the contained data.
- Loading branch information
1 parent
d2a3440
commit 04f79d9
Showing
3 changed files
with
18 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters