We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
C# 11 preview blog post includes UTF-8 String Literals, and Pattern matching with spans (specifically: [ReadOnly]Span<char>).
[ReadOnly]Span<char>
It would be interesting if both can be combined, allowing pattern matching against [ReadOnly]Span<byte>.
[ReadOnly]Span<byte>
For example:
static HttpMethod ParseHttpMethod(ReadOnlySpan<byte> method) { return method switch { "GET" => HttpMethod.Get, "POST" => HttpMethod.Post, ... _ => HttpVerb.Unknown }; }
This is interesting for use-cases that involve parsing UTF-8.
cc @KathleenDollard
Originally posted by @tmds in #6036
The text was updated successfully, but these errors were encountered:
cc @davidfowl
Sorry, something went wrong.
Moving discussion back to the discussion thread for now. Thanks!
No branches or pull requests
C# 11 preview blog post includes UTF-8 String Literals, and Pattern matching with spans (specifically:
[ReadOnly]Span<char>
).It would be interesting if both can be combined, allowing pattern matching against
[ReadOnly]Span<byte>
.For example:
This is interesting for use-cases that involve parsing UTF-8.
cc @KathleenDollard
Originally posted by @tmds in #6036
The text was updated successfully, but these errors were encountered: