News for hackers. Stuff that matters.
Re:Nearly All Binary Searches and Mergesorts Are Broken (2006) by hoosieree on Sunday November 06, 2022 @09:59AM (#33493282)
Or you can return an unsigned int which is the highest valid index+1.

    ['a','b','c'].indexof('b') == 1 // found - return index
    ['a','b','c'].indexof('w') == 3 // not found - return size of array

There are no comments on this comment yet.