
"Marc Mutz" <marc@klaralvdalens-datakonsult.se> skrev i meddelandet news:200607022136.04274.marc@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@klaralvdalens-datakonsult.se, mutz@kde.org Klarälvdalens Datakonsult AB, Platform-independent software solutions