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

◆ Ctor() [5/9]

string System.String.Ctor ( char[] value,
int startIndex,
int length )
inlineprivate

Definition at line 920 of file String.cs.

921 {
922 if (value == null)
923 {
924 throw new ArgumentNullException("value");
925 }
926 if (startIndex < 0)
927 {
928 throw new ArgumentOutOfRangeException("startIndex", SR.ArgumentOutOfRange_StartIndex);
929 }
930 if (length < 0)
931 {
932 throw new ArgumentOutOfRangeException("length", SR.ArgumentOutOfRange_NegativeLength);
933 }
934 if (startIndex > value.Length - length)
935 {
936 throw new ArgumentOutOfRangeException("startIndex", SR.ArgumentOutOfRange_Index);
937 }
938 if (length == 0)
939 {
940 return Empty;
941 }
943 nuint elementCount = (uint)text.Length;
945 return text;
946 }
static unsafe ref byte GetArrayDataReference(Array array)
static readonly string Empty
Definition String.cs:29
static string FastAllocateString(int length)

References System.SR.ArgumentOutOfRange_Index, System.SR.ArgumentOutOfRange_NegativeLength, System.SR.ArgumentOutOfRange_StartIndex, System.String.Empty, System.String.FastAllocateString(), System.Runtime.InteropServices.MemoryMarshal.GetArrayDataReference(), System.length, System.Buffer.Memmove(), System.startIndex, System.text, and System.value.