proposition to std.range: SortedRange.indexOf(value)

Alexander Tankeev atankeev at gmail.com
Wed Dec 19 10:58:06 PST 2012


On Wednesday, 19 December 2012 at 17:57:45 UTC, Andrei 
Alexandrescu wrote:

>> And what if you need all indexes of equal elements? Then you 
>> should do 3
>> searches where 1 could be enough.
>
> Use trisect for that.
Ok, right. All cases can be checked by trisect. Thanks a lot.
No such element - equalRange.length == 0
All indexes - 
[lowerBound.length..lowerBound.length+equalRange.length]

> Andrei
Sincerely yours, Alexander.


More information about the Digitalmars-d mailing list