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

◆ AppendOrInsertAlignmentIfNeeded()

void System.Runtime.CompilerServices.DefaultInterpolatedStringHandler.AppendOrInsertAlignmentIfNeeded ( int startingPos,
int alignment )
inlineprivate

Definition at line 314 of file DefaultInterpolatedStringHandler.cs.

315 {
316 int num = _pos - startingPos;
317 bool flag = false;
318 if (alignment < 0)
319 {
320 flag = true;
321 alignment = -alignment;
322 }
323 int num2 = alignment - num;
324 if (num2 > 0)
325 {
327 if (flag)
328 {
329 _chars.Slice(_pos, num2).Fill(' ');
330 }
331 else
332 {
333 _chars.Slice(startingPos, num).CopyTo(_chars.Slice(startingPos + num2));
334 _chars.Slice(startingPos, num2).Fill(' ');
335 }
336 _pos += num2;
337 }
338 }
Span< T > Slice(int start)
Definition Span.cs:271

References System.Runtime.CompilerServices.DefaultInterpolatedStringHandler._chars, System.Runtime.CompilerServices.DefaultInterpolatedStringHandler._pos, System.Runtime.CompilerServices.DefaultInterpolatedStringHandler.EnsureCapacityForAdditionalChars(), and System.Span< T >.Slice().

Referenced by System.Runtime.CompilerServices.DefaultInterpolatedStringHandler.AppendFormatted< T >(), and System.Runtime.CompilerServices.DefaultInterpolatedStringHandler.AppendFormatted< T >().