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

◆ ReplaceBufferUtf8Internal()

void System.Text.StringBuilder.ReplaceBufferUtf8Internal ( ReadOnlySpan< byte > source)
inlinepackage

Definition at line 488 of file StringBuilder.cs.

489 {
490 if (source.Length > m_MaxCapacity)
491 {
492 throw new ArgumentOutOfRangeException("capacity", SR.ArgumentOutOfRange_Capacity);
493 }
494 int charCount = Encoding.UTF8.GetCharCount(source);
495 if (charCount > m_ChunkChars.Length)
496 {
498 }
499 m_ChunkLength = Encoding.UTF8.GetChars(source, m_ChunkChars);
500 m_ChunkPrevious = null;
501 m_ChunkOffset = 0;
502 }
int GetReplaceBufferCapacity(int requiredCapacity)

References System.SR.ArgumentOutOfRange_Capacity, System.charCount, System.Text.StringBuilder.GetReplaceBufferCapacity(), System.Text.StringBuilder.m_ChunkChars, System.Text.StringBuilder.m_ChunkLength, System.Text.StringBuilder.m_ChunkOffset, System.Text.StringBuilder.m_ChunkPrevious, System.Text.StringBuilder.m_MaxCapacity, System.source, and System.Text.Encoding.UTF8.

Referenced by System.StubHelpers.UTF8BufferMarshaler.ConvertToManaged().