Are there an equivalent to C#'s List in D's stdlib?

Jack jckj33 at gmail.com
Fri Jan 8 03:27:26 UTC 2021


On Friday, 8 January 2021 at 03:14:34 UTC, Mike Parker wrote:
> On Friday, 8 January 2021 at 02:53:47 UTC, Jack wrote:
>> I coduln't find an equivalent in the documentation, I could 
>> see appender, Array, container etc but none of has a Remove(T 
>> item) method like C#'s [1]. Are there not such implementation 
>> and I do have to write one myself or I just couldn't find?
>>
>
> SList and DList both have a function called linearRemoveElement.
>
> https://dlang.org/phobos/std_container_slist.html#.SList.linearRemoveElement
> https://dlang.org/phobos/std_container_dlist.html#.DList.linearRemoveElement

seems to do the job I want, thanks


More information about the Digitalmars-d-learn mailing list