 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Old Wolf Guest
|
Posted: Thu Dec 02, 2004 5:38 am Post subject: lack of find_first_not_of |
|
|
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 ]
|
|
| Back to top |
|
 |
Mickey Moore Guest
|
Posted: Thu Dec 02, 2004 6:22 pm Post subject: Re: lack of find_first_not_of |
|
|
| Quote: | 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 ]
|
|
| Back to top |
|
 |
pjp@plauger.com Guest
|
Posted: Fri Dec 03, 2004 5:19 am Post subject: Re: lack of find_first_not_of |
|
|
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 ]
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|