Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Function trim_left_copy_if

boost::algorithm::trim_left_copy_if — Left trim - parametric.

Synopsis

// In header: <boost/algorithm/string/trim.hpp>


template<typename OutputIteratorT, typename RangeT, typename PredicateT> 
  OutputIteratorT 
  trim_left_copy_if(OutputIteratorT Output, const RangeT & Input, 
                    PredicateT IsSpace);
template<typename SequenceT, typename PredicateT> 
  SequenceT trim_left_copy_if(const SequenceT & Input, PredicateT IsSpace);

Description

Remove all leading spaces from the input. The supplied predicate is used to determine which characters are considered spaces. The result is a trimmed copy of the input. It is returned as a sequence or copied to the output iterator

[Note] Note

The second variant of this function provides the strong exception-safety guarantee

Parameters:

Input

An input range

IsSpace

A unary predicate identifying spaces

Output

An output iterator to which the result will be copied

Returns:

An output iterator pointing just after the last inserted character or a copy of the input


PrevUpHomeNext