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

◆ ReplaceInPlaceAtChunk()

unsafe void System.Text.StringBuilder.ReplaceInPlaceAtChunk ( ref StringBuilder chunk,
ref int indexInChunk,
char * value,
int count )
inlineprivate

Definition at line 2082 of file StringBuilder.cs.

2083 {
2084 if (count == 0)
2085 {
2086 return;
2087 }
2088 while (true)
2089 {
2091 int num = Math.Min(val, count);
2092 new ReadOnlySpan<char>(value, num).CopyTo(chunk.m_ChunkChars.AsSpan(indexInChunk));
2093 indexInChunk += num;
2094 if (indexInChunk >= chunk.m_ChunkLength)
2095 {
2096 chunk = Next(chunk);
2097 indexInChunk = 0;
2098 }
2099 count -= num;
2100 if (count != 0)
2101 {
2102 value += num;
2103 continue;
2104 }
2105 break;
2106 }
2107 }
void CopyTo(KeyValuePair< TKey, TValue >[] array, int index)
StringBuilder Next(StringBuilder chunk)

References System.Collections.Generic.Dictionary< TKey, TValue >.CopyTo(), System.count, System.Runtime.Serialization.Dictionary, System.Math.Min(), System.Text.StringBuilder.Next(), and System.value.

Referenced by System.Text.StringBuilder.Insert(), System.Text.StringBuilder.Insert(), and System.Text.StringBuilder.ReplaceAllInChunk().