Boost logo

Boost :

From: Rozental, Gennadiy (gennadiy.rozental_at_[hidden])
Date: 2002-11-15 13:12:59


> Trimming:
>
> Iterator trim_begin( Iterator InBegin, Iterator InEnd,
> const std::locale& Loc=std::locale() )
> Seq ltrim( const Seq& Input, const std::locale& Loc=std::locale() )
> Seq& ltrim_in( Seq& Input, const std::locale& Loc=std::locale() )
> Seq rtrim( const Seq& Input, const std::locale& Loc=std::locale() )
> Seq& rtrim_in( Seq& Input, const std::locale& Loc=std::locale() )
> Seq trim( const Seq& Input, const std::locale& Loc=std::locale() )
> Seq& trim_in( Seq& Input, const std::locale& Loc=std::locale() )

1. I would prefer explisit names: trim_left, trim_right,...
2. Where do you specify what to trim? What If I want to trim "<>"
3. why do we need not _in functions?
If you want it that bad you could do something like:
Seq& trim_copy( Seq& input, Seq& trim_func( Seq&, const std::locale& ) );

Gennadiy.


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