|
Boost : |
From: Bo Persson (bop_at_[hidden])
Date: 2006-07-02 17:50:02
"Marc Mutz" <marc_at_[hidden]> skrev i meddelandet
news:200607022136.04274.marc_at_klaralvdalens-datakonsult.se...
>On Sunday 02 July 2006 03:03, Jeff Garland wrote:
>> super_string s(" (456789) [123] 2006-10-01 abcdef ");
>> s.to_upper();
>> cout << s << endl;
>>
>> s.trim(); //lop of the whitespace on both sides
>> cout << s << endl;
>
> I really like this proposal, but have a minor point to add:
> IMHO, value classes should have much fewer mutating (non-const)
> (member)
> functions. The above two examples are a very good example.
> to_upper() should
> be const and return the string converted to uppercase, instead of
> performing
> the operation on 'this'.
And in what locale should to_upper work? Swedish?
Bo Persson
-- > Marc Mutz -- marc_at_[hidden], mutz_at_[hidden] > Klarälvdalens Datakonsult AB, Platform-independent software > solutions
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk