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

◆ Slice() [1/3]

static ReadOnlyMemory< byte > System.Formats.Asn1.AsnDecoder.Slice ( ReadOnlyMemory< byte > bigger,
ReadOnlySpan< byte > smaller )
inlinestaticpackage

Definition at line 351 of file AsnDecoder.cs.

352 {
353 if (smaller.IsEmpty)
354 {
355 return default(ReadOnlyMemory<byte>);
356 }
357 if (bigger.Span.Overlaps(smaller, out var elementOffset))
358 {
359 return bigger.Slice(elementOffset, smaller.Length);
360 }
361 throw new AsnContentException();
362 }