Boost logo

Boost :

From: Ross MacGregor (ross__macgregor_at_[hidden])
Date: 2003-10-22 14:14:03


Firingme wrote:
> Can we give some suffix after trim ?
> Just as:
>
> 1
> std::string res = trim_copyto(orig) ;
> 2
> void trim(std::string) ;
> 3
> std::string& trim_chain(std::string) ;

I think this is the best solution yet.

1) The often used inplace operation is short and sweet, matches STL
syntax for mutating algorithms, and is guarded from assignment.

2) Other less often used but useful variants are explicit.

How can you argue against that?

-- 
Ross MacGregor

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk