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

◆ Substring() [2/2]

string System.String.Substring ( int startIndex,
int length )
inline

Definition at line 2997 of file String.cs.

2998 {
2999 if (startIndex < 0)
3000 {
3001 throw new ArgumentOutOfRangeException("startIndex", SR.ArgumentOutOfRange_StartIndex);
3002 }
3003 if (startIndex > Length)
3004 {
3005 throw new ArgumentOutOfRangeException("startIndex", SR.ArgumentOutOfRange_StartIndexLargerThanLength);
3006 }
3007 if (length < 0)
3008 {
3009 throw new ArgumentOutOfRangeException("length", SR.ArgumentOutOfRange_NegativeLength);
3010 }
3011 if (startIndex > Length - length)
3012 {
3013 throw new ArgumentOutOfRangeException("length", SR.ArgumentOutOfRange_IndexLength);
3014 }
3015 if (length == 0)
3016 {
3017 return Empty;
3018 }
3019 if (startIndex == 0 && length == Length)
3020 {
3021 return this;
3022 }
3024 }
string InternalSubString(int startIndex, int length)
Definition String.cs:3026
static readonly string Empty
Definition String.cs:29

References System.SR.ArgumentOutOfRange_IndexLength, System.SR.ArgumentOutOfRange_NegativeLength, System.SR.ArgumentOutOfRange_StartIndex, System.SR.ArgumentOutOfRange_StartIndexLargerThanLength, System.String.Empty, System.String.InternalSubString(), System.length, System.String.Length, and System.startIndex.