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

◆ AsMemory() [3/5]

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

Definition at line 421 of file MemoryExtensions.cs.

422 {
423 if (text == null)
424 {
425 if (start != 0)
426 {
427 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.start);
428 }
429 return default(ReadOnlyMemory<char>);
430 }
431 if ((uint)start > (uint)text.Length)
432 {
433 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.start);
434 }
435 return new ReadOnlyMemory<char>(text, start, text.Length - start);
436 }

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