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

◆ Ctor() [8/9]

unsafe string System.String.Ctor ( sbyte * value,
int startIndex,
int length )
inlineprivate

Definition at line 1024 of file String.cs.

1025 {
1026 if (startIndex < 0)
1027 {
1028 throw new ArgumentOutOfRangeException("startIndex", SR.ArgumentOutOfRange_StartIndex);
1029 }
1030 if (length < 0)
1031 {
1032 throw new ArgumentOutOfRangeException("length", SR.ArgumentOutOfRange_NegativeLength);
1033 }
1034 if (value == null)
1035 {
1036 if (length == 0)
1037 {
1038 return Empty;
1039 }
1040 throw new ArgumentNullException("value");
1041 }
1042 byte* ptr = (byte*)(value + startIndex);
1043 if (ptr < value)
1044 {
1045 throw new ArgumentOutOfRangeException("value", SR.ArgumentOutOfRange_PartialWCHAR);
1046 }
1048 }
static readonly string Empty
Definition String.cs:29
static unsafe string CreateStringForSByteConstructor(byte *pb, int numBytes)
Definition String.cs:1050

References System.SR.ArgumentOutOfRange_NegativeLength, System.SR.ArgumentOutOfRange_PartialWCHAR, System.SR.ArgumentOutOfRange_StartIndex, System.String.CreateStringForSByteConstructor(), System.String.Empty, System.length, System.startIndex, and System.value.