Topic: lack of find_first_not_of
Author: oldwolf@inspire.net.nz (Old Wolf)
Date: Thu, 2 Dec 2004 05:38:16 GMT Raw View
In std::string there is find_first_of and find_first_not_of.
But in <algorithm> there is only first_first_of.
Why isn't there find_first_not_of in <algorithm> ?
It's a trivial code change from the implementation of find_first_of.
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]
Author: mgmoore@austin.rr.com (Mickey Moore)
Date: Thu, 2 Dec 2004 18:22:25 GMT Raw View
> In std::string there is find_first_of and find_first_not_of.
> But in <algorithm> there is only first_first_of.
> Why isn't there find_first_not_of in <algorithm> ?
> It's a trivial code change from the implementation of find_first_of.
I would guess because you can supply a predicate to the find_first_of
algorithm that inverts the test, while string's find_first_of doesn't
have this functionality.
-- Mickey Moore
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]
Author: pjp@plauger.com
Date: Thu, 2 Dec 2004 23:19:39 CST Raw View
Because it was a different subgroup that thought up member functions
for template class string from the group that developed the Standard
Template Library. And there was very little effort at homogenizing the
Standard C++ library along the way.
P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]