MemoryBlock.MidB

From Xojo Documentation

Method

MemoryBlock.MidB(Offset as Integer [,Length as Integer]) As MemoryBlock

Supported for all project types and targets.

Returns a new MemoryBlock of the specified size using the same endianness as the source MemoryBlock. Offset is in bytes from the beginning of the MemoryBlock.

Sample Code

This example extracts two bytes from a MemoryBlock.

Var m As New MemoryBlock(12)
.
.
Var n As New MemoryBlock(4)
n = m.MidB(1, 2)