Boost logo

Boost :

From: Darren Cook (darren_at_[hidden])
Date: 2003-10-29 18:53:29


> If you change "nth" in "find_nth" to something else, or rename
> the function altogether, we avoid the confusion.

In that case the find_occurrence() suggestion from earlier (quoted below)
seems reasonable. Hard-to-spell is not really a problem as the compiler will
catch it (and maybe even a clever editor).

Though, FWIW, I'd expect find_0th to find the first occurrence when I'm
working in any C-like language.

(Hmmm... I used "occurrence" there without thinking, so probably
find_occurrence() is a good choice).

Darren

>How about find_occurrence(). It means the right thing, and doesn't
> suggest 1 as the starting index as find_nth() does for some. The big
> disadvantage is that it is tough to spell (two c's and two r's).


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk