Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ WriteFormatHelper()

void System.IO.StreamWriter.WriteFormatHelper ( string format,
ParamsArray args,
bool appendNewLine )
inlineprivate

Definition at line 454 of file StreamWriter.cs.

455 {
456 StringBuilder stringBuilder = StringBuilderCache.Acquire((format?.Length ?? 0) + args.Length * 8).AppendFormatHelper(null, format, args);
457 StringBuilder.ChunkEnumerator chunks = stringBuilder.GetChunks();
458 bool flag = chunks.MoveNext();
459 while (flag)
460 {
461 ReadOnlySpan<char> span = chunks.Current.Span;
462 flag = chunks.MoveNext();
463 WriteSpan(span, !flag && appendNewLine);
464 }
465 StringBuilderCache.Release(stringBuilder);
466 }
unsafe void WriteSpan(ReadOnlySpan< char > buffer, bool appendNewLine)
static void Release(StringBuilder sb)
static StringBuilder Acquire(int capacity=16)
ChunkEnumerator GetChunks()
unsafe ReadOnlySpan< T > Span

References System.Text.StringBuilderCache.Acquire(), System.Text.StringBuilder.ChunkEnumerator.Current, System.format, System.Text.StringBuilder.GetChunks(), System.ParamsArray.Length, System.Text.StringBuilder.ChunkEnumerator.MoveNext(), System.Text.StringBuilderCache.Release(), System.ReadOnlyMemory< T >.Span, and System.IO.StreamWriter.WriteSpan().

Referenced by System.IO.StreamWriter.Write(), System.IO.StreamWriter.Write(), System.IO.StreamWriter.Write(), System.IO.StreamWriter.Write(), System.IO.StreamWriter.WriteLine(), System.IO.StreamWriter.WriteLine(), System.IO.StreamWriter.WriteLine(), and System.IO.StreamWriter.WriteLine().