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

◆ EatAllWhitespace()

static ReadOnlySpan< char > System.Guid.EatAllWhitespace ( ReadOnlySpan< char > str)
inlinestaticprivate

Definition at line 644 of file Guid.cs.

645 {
646 int i;
647 for (i = 0; i < str.Length && !char.IsWhiteSpace(str[i]); i++)
648 {
649 }
650 if (i == str.Length)
651 {
652 return str;
653 }
654 char[] array = new char[str.Length];
655 int length = 0;
656 if (i > 0)
657 {
658 length = i;
659 str.Slice(0, i).CopyTo(array);
660 }
661 for (; i < str.Length; i++)
662 {
663 char c = str[i];
664 if (!char.IsWhiteSpace(c))
665 {
666 array[length++] = c;
667 }
668 }
669 return new ReadOnlySpan<char>(array, 0, length);
670 }

References System.array, System.length, and System.str.

Referenced by System.Guid.TryParseExactX().