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

◆ GetString() [3/4]

unsafe override string System.Text.UTF7Encoding.GetString ( byte[] bytes,
int index,
int count )
inlinevirtual

Reimplemented from System.Text.Encoding.

Definition at line 453 of file UTF7Encoding.cs.

454 {
455 if (bytes == null)
456 {
457 throw new ArgumentNullException("bytes", SR.ArgumentNull_Array);
458 }
459 if (index < 0 || count < 0)
460 {
461 throw new ArgumentOutOfRangeException((index < 0) ? "index" : "count", SR.ArgumentOutOfRange_NeedNonNegNum);
462 }
463 if (bytes.Length - index < count)
464 {
465 throw new ArgumentOutOfRangeException("bytes", SR.ArgumentOutOfRange_IndexCountBuffer);
466 }
467 if (count == 0)
468 {
469 return string.Empty;
470 }
471 fixed (byte* ptr = bytes)
472 {
473 return string.CreateStringFromEncoding(ptr + index, count, this);
474 }
475 }

References System.SR.ArgumentNull_Array, System.SR.ArgumentOutOfRange_IndexCountBuffer, System.SR.ArgumentOutOfRange_NeedNonNegNum, System.bytes, System.count, and System.index.