Skip to content

Commit

Permalink
p GetBufferWriter/GetCurrentWritten/GetAllocatedDestinationSize/TryGrow
Browse files Browse the repository at this point in the history
  • Loading branch information
neuecc committed Nov 20, 2023
1 parent b240b9a commit 43d5845
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Utf8StringInterpolation/Utf8StringWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ public ref partial struct Utf8StringWriter<TBufferWriter>
IFormatProvider? formatProvider;
bool calculateStringJustSize;

internal TBufferWriter GetBufferWriter() => bufferWriter;
internal int GetCurrentWritten() => currentWritten;
internal int GetAllocatedDestinationSize() => allocatedDestinationSize;
public TBufferWriter GetBufferWriter() => bufferWriter;
public int GetCurrentWritten() => currentWritten;
public int GetAllocatedDestinationSize() => allocatedDestinationSize;

// create directly
public Utf8StringWriter(TBufferWriter bufferWriter, IFormatProvider? formatProvider = default)
Expand Down Expand Up @@ -58,7 +58,7 @@ public Utf8StringWriter(int literalLength, int formattedCount, IFormatProvider?
TryGrow(initialSize);
}

// from bool Tryormat, use ThreadStatic ArrayBufferWriter
// from bool TryFormat, use ThreadStatic ArrayBufferWriter
public Utf8StringWriter(int literalLength, int formattedCount, Span<byte> destination, IFormatProvider? formatProvider = default)
{
this.bufferWriter = (TBufferWriter)(object)ArrayBufferWriterPool.GetThreadStaticInstance();
Expand Down Expand Up @@ -398,7 +398,7 @@ public void AppendLine(string s)
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
void TryGrow(int len)
public void TryGrow(int len)
{
if (destination.Length < len)
{
Expand Down

0 comments on commit 43d5845

Please sign in to comment.