Add methods to StringBuilder to append ReadOnlySpan<char> #19437
Labels
api-needs-work
API needs work before it is approved, it is NOT ready for implementation
area-System.Runtime
blocked
Issue/PR is blocked on something - see comments
Milestone
Background
It seems logical that we should support appending
Span<char>
andReadOnlySpan<char>
to a StringBuilder, since the point of both data types is to reduce allocations. The only way to do this with the current APIs is to loop through the span one char at a time and call Append on each of them, which is pretty slow.Proposed API
cc @jkotas, @KrzysztofCwalina, @justinvp
The text was updated successfully, but these errors were encountered: