DotNext by .NET Foundation and Contributors

<PackageReference Include="DotNext" Version="4.0.0-rc.2" />

 MemoryTemplate<T>

public struct MemoryTemplate<T> where T : IEquatable<T>
public ReadOnlyMemory<T> Value { get; }

public MemoryTemplate(ReadOnlyMemory<T> template, ReadOnlySpan<T> placeholder)

public void Render<TConsumer>(TConsumer consumer) where TConsumer : IReadOnlySpanConsumer<T>, IConsumer<int>

public void Render<TWriter>(TWriter output, Action<int, TWriter> rewriter) where TWriter : IBufferWriter<T>

public void Render<TArg>(TArg arg, Action<int, TArg> rewriter, ReadOnlySpanAction<T, TArg> output)