std.algorithm.strip functionality

Pete Padil padil at gm.com
Tue May 6 21:19:29 UTC 2025


I compiled and ran the following test program:
```d
import std.stdio, std.algorithm;

void main()
{
    long[] a = [1, 2, 3, 15, 4];
    auto b = a[].strip(15);
    writeln(a);
    writeln(b);
}
```
I get:
[1, 2, 3, 15, 4]
[1, 2, 3, 15, 4]
It did not remove 15, it does work if 15 is at the beginning or 
end.
Is this a bug or am I misunderstading the docs?

version:   1.41.0-beta1 (DMD v2.111.0, LLVM 19.1.7)

thanks


More information about the Digitalmars-d-learn mailing list