-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
api-needs-workAPI needs work before it is approved, it is NOT ready for implementationAPI needs work before it is approved, it is NOT ready for implementationarea-System.RuntimeblockedIssue/PR is blocked on something - see commentsIssue/PR is blocked on something - see comments
Milestone
Description
Background
It seems logical that we should support appending Span<char> and ReadOnlySpan<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
namespace System.Text
{
public sealed class StringBuilder
{
// Span is implicitly convertible to ReadOnlySpan
public StringBuilder Append(ReadOnlySpan<char> value);
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api-needs-workAPI needs work before it is approved, it is NOT ready for implementationAPI needs work before it is approved, it is NOT ready for implementationarea-System.RuntimeblockedIssue/PR is blocked on something - see commentsIssue/PR is blocked on something - see comments