Table of Contents

Method TryMatchAt

Namespace
MonoMod.Core.Utils
Assembly
MonoMod.Core.dll

TryMatchAt(ReadOnlySpan<byte>, out ulong, out int)

Tries to match this pattern over the provided span.
public bool TryMatchAt(ReadOnlySpan<byte> data, out ulong address, out int length)

Parameters

data ReadOnlySpan<byte>
The data to try to match at the start of.
address ulong
The address which is parsed out of the data.
length int
The length of the matched pattern.

Returns

bool
true if data matched at the start; false otherwise.

Remarks

address is constructed starting at the byte with the lowest address. This means that big-endian machines may need the address to be shifted if the address is smaller than 64 bits.

TryMatchAt(ReadOnlySpan<byte>, Span<byte>, out int)

Tries to match this pattern over the provided span.
public bool TryMatchAt(ReadOnlySpan<byte> data, Span<byte> addrBuf, out int length)

Parameters

data ReadOnlySpan<byte>
The data to try to match at the start of.
addrBuf Span<byte>
A buffer to write address bytes to.
length int
The length of the matched pattern.

Returns

bool
true if data matched at the start; false otherwise.