Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
trim_all.hpp File Reference

Defines trim_all algorithms. More...

Include dependency graph for trim_all.hpp:

Namespaces

 boost
 Duration formatting facet for input.
 
 boost::algorithm
 

Functions

template<typename SequenceT , typename PredicateT >
SequenceT boost::algorithm::trim_all_copy_if (const SequenceT &Input, PredicateT IsSpace)
 Trim All - parametric. More...
 
template<typename SequenceT , typename PredicateT >
void boost::algorithm::trim_all_if (SequenceT &Input, PredicateT IsSpace)
 Trim All. More...
 
template<typename SequenceT >
SequenceT boost::algorithm::trim_all_copy (const SequenceT &Input, const std::locale &Loc=std::locale())
 Trim All. More...
 
template<typename SequenceT >
void boost::algorithm::trim_all (SequenceT &Input, const std::locale &Loc=std::locale())
 Trim All. More...
 
template<typename SequenceT , typename RangeT , typename PredicateT >
SequenceT boost::algorithm::trim_fill_copy_if (const SequenceT &Input, const RangeT &Fill, PredicateT IsSpace)
 Trim Fill - parametric. More...
 
template<typename SequenceT , typename RangeT , typename PredicateT >
void boost::algorithm::trim_fill_if (SequenceT &Input, const RangeT &Fill, PredicateT IsSpace)
 Trim Fill. More...
 
template<typename SequenceT , typename RangeT >
SequenceT boost::algorithm::trim_fill_copy (const SequenceT &Input, const RangeT &Fill, const std::locale &Loc=std::locale())
 Trim Fill. More...
 
template<typename SequenceT , typename RangeT >
void boost::algorithm::trim_fill (SequenceT &Input, const RangeT &Fill, const std::locale &Loc=std::locale())
 Trim Fill. More...
 

Detailed Description

Defines trim_all algorithms.

Just like trim, trim_all removes all trailing and leading spaces from a sequence (string). In addition, spaces in the middle of the sequence are truncated to just one character. Space is recognized using given locales.

trim_fill acts as trim_all, but the spaces in the middle are replaces with a user-define sequence of character.

Parametric (_if) variants use a predicate (functor) to select which characters are to be trimmed.. Functions take a selection predicate as a parameter, which is used to determine whether a character is a space. Common predicates are provided in classification.hpp header.