Skip to content
StrIterFromCstr

StrIterFromCstr

Description

Construct a forward-walking StrIter over an explicit (char *, n) byte range. Alias-reframe of the IterInitFromVec shape with caller-supplied length; alignment is fixed at 1. See IterInitFromVec for the overall borrowed-data semantics.

Parameters

Name Direction Description
s in Pointer to the first character. Must outlive the iterator.
n in Number of characters reachable through the iterator.

Success

Returns a compound-literal StrIter covering [s, s + n) with pos = 0, dir = 1.

Failure

Macro cannot fail. Passing n larger than the actual allocation is a usage error – subsequent reads will run past the end.

Usage example (Cross-references)

Usage examples (Cross-references)
No external code usages found in the scanned files.
Last updated on