Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use IndexOfAnyValues in Xml #78664

Merged
merged 3 commits into from
Nov 23, 2022
Merged

Conversation

MihaZupan
Copy link
Member

Contributes to #78204

@MihaZupan MihaZupan added this to the 8.0.0 milestone Nov 21, 2022
@MihaZupan MihaZupan marked this pull request as ready for review November 21, 2022 23:20
@ghost ghost assigned MihaZupan Nov 21, 2022
@ghost
Copy link

ghost commented Nov 21, 2022

Tagging subscribers to this area: @dotnet/area-system-xml
See info in area-owners.md if you want to be subscribed.

Issue Details

Contributes to #78204

Author: MihaZupan
Assignees: -
Labels:

area-System.Xml

Milestone: 8.0.0

@@ -30,6 +30,10 @@ internal static class XmlConverter
public const int MaxUInt64Chars = 32;
public const int MaxPrimitiveChars = MaxDateTimeChars;

// Matches IsWhitespace below
private static readonly IndexOfAnyValues<char> s_whitespaceChars = IndexOfAnyValues.Create(" \t\r\n");
private static readonly IndexOfAnyValues<byte> s_whitespaceBytes = IndexOfAnyValues.Create(" \t\r\n"u8);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IndexOfAnyValues.Create and u8 go nicely together.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants