portionBy

Portions range into blocks of blockSize, with optional padding.

T[]
portionBy
(
T
)
(
ref T range
,
size_t blockSize
,
bool pad = true
)

Parameters

range T

The range to be portioned.

blockSize size_t

The size of the blocks to be portioned.

pad bool

Should the range be padded? Defaults to true.

Return Value

Type: T[]

range portioned into blocks of blockSize.

Meta