Testing array ptr for offset 0...

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu May 26 05:33:31 PDT 2016


On Thursday, 26 May 2016 at 12:30:30 UTC, Alex Parrill wrote:
> The line "not having to make another array to keep track of 
> lengths and then shorten them" is fairly vague. "Shortening" an 
> array via slicing is basically free (it's just some integer 
> arithmetic), but I'm not sure if that's what you meant.


Indeed, creating a slice from a static array, another slice, or a 
pointer is free too...


More information about the Digitalmars-d-learn mailing list