Boost logo

Boost :

From: Shunsuke Sogame (mb2act_at_[hidden])
Date: 2006-07-03 13:36:17

Jeff Garland wrote:
> Well, I went about 50% of the way on this. You'll notice that for some things
> there are non-modifying variations.
> basic_super_string trim_copy() const;
> basic_super_string trim_left_copy() const;
> basic_super_string trim_right_copy() const;
> basic_super_string to_lower_copy() const;
> basic_super_string to_upper_copy() const;
> I just got tired and didn't add all the variations for replace_xxx. Of course
> that makes the interface even fatter :-)

Apart from optimization, the future (under range proposal)
'to_upper' might be:

     std::vector<char> const rng;
     std::string dst(rng|to_upper);

The following is possible today:

     std::string dst = range_construct(rng|to_upper);
     range_copy(rng|to_upper|to_lower|to_upper, dst);

Note that '|to_upper' is lazy.

Well, IMHO, I prefer free-functions for another readability:

     ::CString rng;

     std::vector<char> rng;

     super_string str;
     str.to_upper(); // !

Shunsuke Sogame

Boost list run by bdawes at, gregod at, cpdaniel at, john at