Skip to main content

Binary.Range

Returns a subset of the binary value beginning at an offset.

Syntax

Binary.Range(
binary as binary,
offset as number,
optional count as number
) as binary

Remarks

Returns a subset of the binary value beginning at the offset binary. An optional parameter, offset, sets the maximum length of the subset.

Examples

Example #1

Returns a subset of the binary value starting at offset 6.

Binary.Range(#binary({0..10}), 6)

Result:

#binary({6, 7, 8, 9, 10})

Example #2

Returns a subset of length 2 from offset 6 of the binary value.

Binary.Range(#binary({0..10}), 6, 2)

Result:

#binary({6, 7})

Category

Binary