Strange behavior of the function find() and remove()
safety0ff via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Mar 8 14:58:19 PDT 2015
On Sunday, 8 March 2015 at 21:34:25 UTC, Dennis Ritchie wrote:
> This is normal behavior?
>
Yes it is normal, there are two potential points of confusion:
- remove mutates the input range and returns a shortened slice to
the range which excludes the removed element.
- remove takes an index as its second argument, not an element.
For more information see:
https://issues.dlang.org/show_bug.cgi?id=10959
More information about the Digitalmars-d-learn
mailing list