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

◆ AsMemory() [5/5]

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

Definition at line 473 of file MemoryExtensions.cs.

474 {
475 if (text == null)
476 {
477 Index start = range.Start;
478 Index end = range.End;
479 if (!start.Equals(Index.Start) || !end.Equals(Index.Start))
480 {
481 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.text);
482 }
483 return default(ReadOnlyMemory<char>);
484 }
485 var (start2, length) = range.GetOffsetAndLength(text.Length);
487 }

References System.Index.Equals(), System.length, System.start, System.Index.Start, System.text, and System.ThrowHelper.ThrowArgumentNullException().