Open megasuperlexa opened 4 months ago
1) All api proposals should use the "API Proposal" template, see api-review-process.md
2) Convert.FromHexString
has overloads to accept output buffers, why don't they work for you?
Convert.FromHexString has overloads to accept output buffers, why don't they work for you?
The non-allocating ones are new in .NET 9. But, the point remains that starting in .NET 9, you can use Convert.FromHexString
that returns an OperationStatus
and can write to an existing buffer.
Tagging subscribers to this area: @dotnet/area-system-runtime See info in area-owners.md if you want to be subscribed.
Rationale: currently I have to use
Convert.FromHexString
method which does not supportArray.Pool
which createsbyte[]
garbage in my app' hotpath. UsingHexConverter.TryDecodeFromUtf16
would allow me to use externally managed byte array.https://github.com/dotnet/runtime/blob/5e1081f6a0c86489e7fda575735ef49ff2ca3efa/src/libraries/Common/src/System/HexConverter.cs#L18