DotNext by .NET Foundation and Contributors

<PackageReference Include="DotNext" Version="5.8.0" />

.NET API 503,240 bytes

 BufferWriterInterpolatedStringHandler

Represents handler of the interpolated string that can be written to IBufferWriter<T> without temporary allocations.
public int WrittenCount { get; }

Gets number of written characters.

public BufferWriterInterpolatedStringHandler(int literalLength, int formattedCount, IBufferWriter<char> buffer, IFormatProvider provider = null)

Initializes a new interpolated string handler.

public void AppendFormatted<T>(T value, string format = null)

Writes the specified value to the handler.

public void AppendFormatted(ReadOnlySpan<char> value)

Writes the specified character span to the handler.

public void AppendFormatted(ReadOnlySpan<char> value, int alignment)

Writes the specified string of chars to the handler.

public void AppendFormatted<T>(T value, int alignment, string format = null)

Writes the specified value to the handler.

public void AppendLiteral(string value)

Writes the specified string to the handler.