Optimize readonly char[] in System.Text.Encodings.Web (#48181)
authorEric Erhardt <eric.erhardt@microsoft.com>
Fri, 12 Feb 2021 19:30:09 +0000 (13:30 -0600)
committerGitHub <noreply@github.com>
Fri, 12 Feb 2021 19:30:09 +0000 (13:30 -0600)
commitbc864fa3479602659107ec3d37b710004088045d
tree8a18ec4b34a0a7d96ab10408269f3dd8b07f8450
parentedaa380d6416bf9d196dc15c3d85b74fbf7ca6e5
Optimize readonly char[] in System.Text.Encodings.Web (#48181)

* Optimize readonly char[] in System.Text.Encodings.Web

Also replace some unsafe code with Span.

* Convert to use const strings.
src/libraries/System.Text.Encodings.Web/src/System/Text/Encodings/Web/DefaultJavaScriptEncoder.cs
src/libraries/System.Text.Encodings.Web/src/System/Text/Encodings/Web/DefaultJavaScriptEncoderBasicLatin.cs
src/libraries/System.Text.Encodings.Web/src/System/Text/Encodings/Web/HtmlEncoder.cs
src/libraries/System.Text.Encodings.Web/src/System/Text/Encodings/Web/TextEncoder.cs
src/libraries/System.Text.Encodings.Web/src/System/Text/Encodings/Web/UnsafeRelaxedJavaScriptEncoder.cs
src/libraries/System.Text.Encodings.Web/src/System/Text/Encodings/Web/UrlEncoder.cs