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

◆ RemoveTrailingInQuoteSpaces()

void System.__DTString.RemoveTrailingInQuoteSpaces ( )
inlinepackage

Definition at line 371 of file __DTString.cs.

372 {
373 int num = Length - 1;
374 if (num <= 1)
375 {
376 return;
377 }
378 char c = Value[num];
379 if ((c == '\'' || c == '"') && char.IsWhiteSpace(Value[num - 1]))
380 {
381 num--;
382 while (num >= 1 && char.IsWhiteSpace(Value[num - 1]))
383 {
384 num--;
385 }
386 Span<char> span = new char[num + 1];
387 span[num] = c;
388 Value.Slice(0, num).CopyTo(span);
389 Value = span;
390 }
391 }
ReadOnlySpan< T > Slice(int start)
ReadOnlySpan< char > Value
Definition __DTString.cs:8

References System.__DTString.Length, System.ReadOnlySpan< T >.Slice(), and System.__DTString.Value.