popSegment

Helper function to pop a single segment from an array of segments, and increment a referenced index variable.

@safe
string
popSegment
(
I
)
(,
ref uint idx
)
if (
isRandomAccessRange!I &&
hasLength!I
&&
is(ElementType!I : string)
)

Parameters

segments I

The list of segments to pop from.

idx uint

The referenced index to increment.

Return Value

Type: string

The segment that was popped, or null if we've reached the end of the segments list.

Meta