|
Boost : |
From: Pavol Droba (droba_at_[hidden])
Date: 2002-10-21 05:48:00
On Fri, Oct 18, 2002 at 09:55:08PM +0100, Craig Henderson wrote:
>
>
> Conversion of case can easily be performed with
> std::transform(str.begin(), str.end(), str.begin(), ::toupper);
>
> How do you propose a simplified version? Perhaps
> template<typename T>
> void to_upper(T &cont)
> {
> std::transform(cont.begin(), cont.end(), cont.begin(), ::toupper);
> }
>
> or something similar ?
well this is a sollution, but I was thinking also about non in-space transformations.
>
>
> It would be nice to see these implemented generically rather than
> specifically for strings. Most of the functions in the list above could
> equally apply to sequences of other types. Thus
>
> template<typename ItIn1, ItIn2>
> inline bool contains(ItIn1 begin1, ItIn1 end1, InIt2 begin2, InIt2 end)
>
iterator trasformation should be included, that obvious.
I the first iteration I would like to support sequence containter.
Pavol
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk