On Mon, Jan 06, 2025 at 07:30:27PM +0000, Renato via Digitalmars-d-learn wrote: > Is there any Phobos function that collects "some" items of a range > into an array/slice? > It's kind of embarrassing that I've been trying to find this for hours > now without success :(. [...] > My use case is to parse a file format where a line is expected to have > 4 items. I am currently using `takeExactly(4)` but that doesn't let me > index on it, so I can only think of doing inconvenient (and > inefficient) stuff like `front, skip(1).front ...` to avoid having to > write my own `toArray` :D. I couldn't even find a method to take 1 > item and advance the range! Am I just looking at the entirely wrong > places (std.range, std.algorithm.iteration)?? [...]
What's wrong with just using std.array.array? T -- Recently, our IT department hired a bug-fix engineer. He used to work for Volkswagen.