get number of items in DList

Ary Borenszweig via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jul 11 06:23:58 PDT 2014


On 7/11/14, 4:46 AM, bearophile wrote:
> pgtkda:
>
>> How can i get the number of items which are currently hold in a DList?
>
> Try (walkLength is from std.range):
>
> mydList[].walkLength
>
> Bye,
> bearophile

So the doubly linked list doesn't know it's length? That seems a bit 
inefficient...


More information about the Digitalmars-d-learn mailing list