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

◆ ToString() [2/2]

unsafe string System.Text.StringBuilder.ToString ( int startIndex,
int length )
inline

Definition at line 706 of file StringBuilder.cs.

707 {
708 int length2 = Length;
709 if (startIndex < 0)
710 {
711 throw new ArgumentOutOfRangeException("startIndex", SR.ArgumentOutOfRange_StartIndex);
712 }
713 if (startIndex > length2)
714 {
715 throw new ArgumentOutOfRangeException("startIndex", SR.ArgumentOutOfRange_StartIndexLargerThanLength);
716 }
717 if (length < 0)
718 {
719 throw new ArgumentOutOfRangeException("length", SR.ArgumentOutOfRange_NegativeLength);
720 }
721 if (startIndex > length2 - length)
722 {
723 throw new ArgumentOutOfRangeException("length", SR.ArgumentOutOfRange_IndexLength);
724 }
725 string text = string.FastAllocateString(length);
726 fixed (char* pointer = text)
727 {
729 return text;
730 }
731 }
void CopyTo(int sourceIndex, char[] destination, int destinationIndex, int count)

References System.SR.ArgumentOutOfRange_IndexLength, System.SR.ArgumentOutOfRange_NegativeLength, System.SR.ArgumentOutOfRange_StartIndex, System.SR.ArgumentOutOfRange_StartIndexLargerThanLength, System.Text.StringBuilder.CopyTo(), System.Runtime.Serialization.Dictionary, System.length, System.Text.StringBuilder.Length, System.length2, System.pointer, System.startIndex, and System.text.