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

◆ AsMemory() [4/5]

static ReadOnlyMemory< char > System.MemoryExtensions.AsMemory ( this string? text,
int start,
int length )
inlinestatic

Definition at line 456 of file MemoryExtensions.cs.

457 {
458 if (text == null)
459 {
460 if (start != 0 || length != 0)
461 {
462 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.start);
463 }
464 return default(ReadOnlyMemory<char>);
465 }
466 if ((ulong)((long)(uint)start + (long)(uint)length) > (ulong)(uint)text.Length)
467 {
468 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.start);
469 }
471 }

References System.length, System.start, System.text, and System.ThrowHelper.ThrowArgumentOutOfRangeException().