mirror of
https://github.com/boostorg/algorithm.git
synced 2025-07-05 16:56:39 +02:00
Fixing documentation grammar and spelling
[SVN r23606]
This commit is contained in:
@ -32,18 +32,17 @@ namespace boost {
|
|||||||
/*!
|
/*!
|
||||||
Each element of the input sequence is converted to lower
|
Each element of the input sequence is converted to lower
|
||||||
case. The result is a copy of the input converted to lower case.
|
case. The result is a copy of the input converted to lower case.
|
||||||
It is returned as a sequence or copied to an output iterator.
|
It is returned as a sequence or copied to the output iterator.
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input collection
|
\param Input An input collection
|
||||||
\param Loc A locale used for conversion
|
\param Loc A locale used for conversion
|
||||||
\return
|
\return
|
||||||
An output iterator pointing just after last inserted character or
|
An output iterator pointing just after the last inserted character or
|
||||||
a copy of the input
|
a copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<typename OutputIteratorT, typename CollectionT>
|
template<typename OutputIteratorT, typename CollectionT>
|
||||||
inline OutputIteratorT
|
inline OutputIteratorT
|
||||||
@ -107,18 +106,16 @@ namespace boost {
|
|||||||
/*!
|
/*!
|
||||||
Each element of the input sequence is converted to upper
|
Each element of the input sequence is converted to upper
|
||||||
case. The result is a copy of the input converted to upper case.
|
case. The result is a copy of the input converted to upper case.
|
||||||
It is returned as a sequence or copied to an output iterator
|
It is returned as a sequence or copied to the output iterator
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input collection
|
\param Input An input collection
|
||||||
\param Loc A locale used for conversion
|
\param Loc A locale used for conversion
|
||||||
\return
|
\return
|
||||||
An output iterator pointing just after last inserted character or
|
An output iterator pointing just after the last inserted character or
|
||||||
a copy of the input
|
a copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<typename OutputIteratorT, typename CollectionT>
|
template<typename OutputIteratorT, typename CollectionT>
|
||||||
inline OutputIteratorT
|
inline OutputIteratorT
|
||||||
|
@ -29,7 +29,7 @@ namespace boost {
|
|||||||
|
|
||||||
//! is_classified predicate
|
//! is_classified predicate
|
||||||
/*!
|
/*!
|
||||||
Construct the \c is_classified predicate. This predicate holds, if an input is
|
Construct the \c is_classified predicate. This predicate holds if the input is
|
||||||
of specified \c std::ctype category.
|
of specified \c std::ctype category.
|
||||||
|
|
||||||
\param Type A \c std::ctype category
|
\param Type A \c std::ctype category
|
||||||
@ -44,7 +44,7 @@ namespace boost {
|
|||||||
|
|
||||||
//! is_space predicate
|
//! is_space predicate
|
||||||
/*!
|
/*!
|
||||||
Construct the \c is_classified predicate for \c ctype_base::space category.
|
Construct the \c is_classified predicate for the \c ctype_base::space category.
|
||||||
|
|
||||||
\param Loc A locale used for classification
|
\param Loc A locale used for classification
|
||||||
\return An instance of the \c is_classified predicate
|
\return An instance of the \c is_classified predicate
|
||||||
@ -187,7 +187,7 @@ namespace boost {
|
|||||||
|
|
||||||
//! is_any_of predicate
|
//! is_any_of predicate
|
||||||
/*!
|
/*!
|
||||||
Construct the \c is_any_of predicate. The predicate holds, if an input
|
Construct the \c is_any_of predicate. The predicate holds if the input
|
||||||
is included in the specified set of characters.
|
is included in the specified set of characters.
|
||||||
|
|
||||||
\param Set A set of characters to be recognized
|
\param Set A set of characters to be recognized
|
||||||
@ -204,7 +204,7 @@ namespace boost {
|
|||||||
|
|
||||||
//! is_from_range predicate
|
//! is_from_range predicate
|
||||||
/*!
|
/*!
|
||||||
Construct the \c is_from_range predicate. The predicate holds, if an input
|
Construct the \c is_from_range predicate. The predicate holds if the input
|
||||||
is included in the specified range. (i.e. From <= Ch <= To )
|
is included in the specified range. (i.e. From <= Ch <= To )
|
||||||
|
|
||||||
\param From The start of the range
|
\param From The start of the range
|
||||||
@ -264,7 +264,7 @@ namespace boost {
|
|||||||
//! predicate negation operator
|
//! predicate negation operator
|
||||||
/*!
|
/*!
|
||||||
Construct the \c class_not predicate. This predicate represents a negation.
|
Construct the \c class_not predicate. This predicate represents a negation.
|
||||||
\c class_or holds, if of the predicates return false.
|
\c class_or holds if of the predicates return false.
|
||||||
|
|
||||||
\param Pred The predicate to be negated
|
\param Pred The predicate to be negated
|
||||||
\return An instance of the \c class_not predicate
|
\return An instance of the \c class_not predicate
|
||||||
|
@ -46,7 +46,7 @@ namespace boost {
|
|||||||
|
|
||||||
//! collection_traits class
|
//! collection_traits class
|
||||||
/*!
|
/*!
|
||||||
Collection traits provides uniform access to different types of
|
Collection traits provide uniform access to different types of
|
||||||
collections. This functionality allows to write generic algorithms
|
collections. This functionality allows to write generic algorithms
|
||||||
which work with several different kinds of collections.
|
which work with several different kinds of collections.
|
||||||
|
|
||||||
@ -60,10 +60,10 @@ namespace boost {
|
|||||||
- std::pair of iterators
|
- std::pair of iterators
|
||||||
( i.e \c std::pair<vector<int>::iterator,vector<int>::iterator> )
|
( i.e \c std::pair<vector<int>::iterator,vector<int>::iterator> )
|
||||||
|
|
||||||
Collection traits provide a external collection interface operations.
|
Collection traits provide an external collection interface operations.
|
||||||
All are accessible using free-standing functions.
|
All are accessible using free-standing functions.
|
||||||
|
|
||||||
Following operations are supported:
|
The following operations are supported:
|
||||||
- \c size()
|
- \c size()
|
||||||
- \c empty()
|
- \c empty()
|
||||||
- \c begin()
|
- \c begin()
|
||||||
@ -182,7 +182,7 @@ namespace boost {
|
|||||||
|
|
||||||
//! Free-standing empty() function
|
//! Free-standing empty() function
|
||||||
/*!
|
/*!
|
||||||
Check whenever the container is empty. Uses container traits.
|
Check whether the container is empty. Uses container traits.
|
||||||
*/
|
*/
|
||||||
template< typename C >
|
template< typename C >
|
||||||
inline bool empty( const C& c )
|
inline bool empty( const C& c )
|
||||||
|
@ -27,8 +27,8 @@ namespace boost {
|
|||||||
|
|
||||||
//! is_equal functor
|
//! is_equal functor
|
||||||
/*!
|
/*!
|
||||||
Standard STL equal_to does handle only comparison between arguments
|
Standard STL equal_to only handle comparison between arguments
|
||||||
of the same type. This is less restrictive version which wraps == operator.
|
of the same type. This is a less restrictive version which wraps operator ==.
|
||||||
*/
|
*/
|
||||||
struct is_equal
|
struct is_equal
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,7 @@ namespace boost {
|
|||||||
|
|
||||||
//! Finder concept
|
//! Finder concept
|
||||||
/*!
|
/*!
|
||||||
Defines finder concept. Finder is a functor which selects
|
Defines the Finder concept. Finder is a functor which selects
|
||||||
an arbitrary part of a string. Search is performed on
|
an arbitrary part of a string. Search is performed on
|
||||||
the range specified by starting and ending iterators.
|
the range specified by starting and ending iterators.
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ namespace boost {
|
|||||||
|
|
||||||
//! Formatter concept
|
//! Formatter concept
|
||||||
/*!
|
/*!
|
||||||
Defines formatter concept. Formatter is a functor, which
|
Defines the Formatter concept. Formatter is a functor, which
|
||||||
takes a result from a finder operation and transforms it
|
takes a result from a finder operation and transforms it
|
||||||
in a specific way.
|
in a specific way.
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
/*! \file
|
/*! \file
|
||||||
Defines various erase algorithms. Each algorithm removes
|
Defines various erase algorithms. Each algorithm removes
|
||||||
a part(s) of the input according to a searching criteria.
|
part(s) of the input according to a searching criteria.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
@ -30,18 +30,16 @@ namespace boost {
|
|||||||
//! Erase range algorithm
|
//! Erase range algorithm
|
||||||
/*!
|
/*!
|
||||||
Remove the given range from the input. The result is a modified copy of
|
Remove the given range from the input. The result is a modified copy of
|
||||||
the input. It is returned as a sequence or copied to an output iterator.
|
the input. It is returned as a sequence or copied to the output iterator.
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input sequence
|
\param Input An input sequence
|
||||||
\param SearchRange A range in the input to be removed
|
\param SearchRange A range in the input to be removed
|
||||||
\return An output iterator pointing just after last inserted character or
|
\return An output iterator pointing just after the last inserted character or
|
||||||
a modified copy of the input
|
a modified copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
*/
|
||||||
exception guarantee.
|
|
||||||
*/
|
|
||||||
template<typename OutputIteratorT, typename CollectionT>
|
template<typename OutputIteratorT, typename CollectionT>
|
||||||
inline OutputIteratorT erase_range_copy(
|
inline OutputIteratorT erase_range_copy(
|
||||||
OutputIteratorT Output,
|
OutputIteratorT Output,
|
||||||
@ -99,20 +97,17 @@ namespace boost {
|
|||||||
|
|
||||||
//! Erase first algorithm
|
//! Erase first algorithm
|
||||||
/*!
|
/*!
|
||||||
Remove the first match of the string from the input.
|
Remove the first occurence of the substring from the input.
|
||||||
The result is a modified copy of the input. It is returned as a sequence
|
The result is a modified copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator.
|
or copied to the output iterator.
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for
|
\param Search A substring to be searched for
|
||||||
\return An output iterator pointing just after last inserted character or
|
\return An output iterator pointing just after the last inserted character or
|
||||||
a modified copy of the input
|
a modified copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -147,11 +142,11 @@ namespace boost {
|
|||||||
|
|
||||||
//! Erase first algorithm
|
//! Erase first algorithm
|
||||||
/*!
|
/*!
|
||||||
Remove the first match of the string from the input.
|
Remove the first occurence of the substring from the input.
|
||||||
The input sequence is modified in-place.
|
The input sequence is modified in-place.
|
||||||
|
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for.
|
\param Search A substring to be searched for.
|
||||||
*/
|
*/
|
||||||
template<typename SequenceT, typename CollectionT>
|
template<typename SequenceT, typename CollectionT>
|
||||||
inline void erase_first(
|
inline void erase_first(
|
||||||
@ -168,22 +163,20 @@ namespace boost {
|
|||||||
|
|
||||||
//! Erase first algorithm ( case insensitive )
|
//! Erase first algorithm ( case insensitive )
|
||||||
/*!
|
/*!
|
||||||
Remove the first match of the string from the input.
|
Remove the first occurence of the substring from the input.
|
||||||
The result is a modified copy of the input. It is returned as a sequence
|
The result is a modified copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator.
|
or copied to the output iterator.
|
||||||
Searching is case insensitive.
|
Searching is case insensitive.
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for
|
\param Search A substring to be searched for
|
||||||
\param Loc a locale used for case insensitive comparison
|
\param Loc A locale used for case insensitive comparison
|
||||||
\return An output iterator pointing just after last inserted character or
|
\return An output iterator pointing just after the last inserted character or
|
||||||
a modified copy of the input
|
a modified copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
*/
|
||||||
exception guarantee.
|
|
||||||
*/
|
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
typename Collection1T,
|
typename Collection1T,
|
||||||
@ -219,12 +212,12 @@ namespace boost {
|
|||||||
|
|
||||||
//! Erase first algorithm ( case insensitive )
|
//! Erase first algorithm ( case insensitive )
|
||||||
/*!
|
/*!
|
||||||
Remove the first match of the string from the input.
|
Remove the first occurence of the substring from the input.
|
||||||
The input sequence is modified in-place. Searching is case insensitive.
|
The input sequence is modified in-place. Searching is case insensitive.
|
||||||
|
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for
|
\param Search A substring to be searched for
|
||||||
\param Loc a locale used for case insensitive comparison
|
\param Loc A locale used for case insensitive comparison
|
||||||
*/
|
*/
|
||||||
template<typename SequenceT, typename CollectionT>
|
template<typename SequenceT, typename CollectionT>
|
||||||
inline void ierase_first(
|
inline void ierase_first(
|
||||||
@ -242,20 +235,17 @@ namespace boost {
|
|||||||
|
|
||||||
//! Erase last algorithm
|
//! Erase last algorithm
|
||||||
/*!
|
/*!
|
||||||
Remove the last match of the string from the input.
|
Remove the last occurence of the substring from the input.
|
||||||
The result is a modified copy of the input. It is returned as a sequence
|
The result is a modified copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator.
|
or copied to the output iterator.
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for.
|
\param Search A substring to be searched for.
|
||||||
\return An output iterator pointing just after last inserted character or
|
\return An output iterator pointing just after the last inserted character or
|
||||||
a modified copy of the input
|
a modified copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -290,11 +280,11 @@ namespace boost {
|
|||||||
|
|
||||||
//! Erase last algorithm
|
//! Erase last algorithm
|
||||||
/*!
|
/*!
|
||||||
Remove the last match of the string from the input.
|
Remove the last occurence of the substring from the input.
|
||||||
The input sequence is modified in-place.
|
The input sequence is modified in-place.
|
||||||
|
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for
|
\param Search A substring to be searched for
|
||||||
*/
|
*/
|
||||||
template<typename SequenceT, typename CollectionT>
|
template<typename SequenceT, typename CollectionT>
|
||||||
inline void erase_last(
|
inline void erase_last(
|
||||||
@ -311,22 +301,19 @@ namespace boost {
|
|||||||
|
|
||||||
//! Erase last algorithm ( case insensitive )
|
//! Erase last algorithm ( case insensitive )
|
||||||
/*!
|
/*!
|
||||||
Remove the last match of the string from the input.
|
Remove the last occurence of the substring from the input.
|
||||||
The result is a modified copy of the input. It is returned as a sequence
|
The result is a modified copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator.
|
or copied to the output iterator.
|
||||||
Searching is case insensitive.
|
Searching is case insensitive.
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for
|
\param Search A substring to be searched for
|
||||||
\param Loc a locale used for case insensitive comparison
|
\param Loc A locale used for case insensitive comparison
|
||||||
\return An output iterator pointing just after last inserted character or
|
\return An output iterator pointing just after the last inserted character or
|
||||||
a modified copy of the input
|
a modified copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -363,12 +350,12 @@ namespace boost {
|
|||||||
|
|
||||||
//! Erase last algorithm ( case insensitive )
|
//! Erase last algorithm ( case insensitive )
|
||||||
/*!
|
/*!
|
||||||
Remove the last match of the string from the input.
|
Remove the last occurence of the substring from the input.
|
||||||
The input sequence is modified in-place. Searching is case insensitive.
|
The input sequence is modified in-place. Searching is case insensitive.
|
||||||
|
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for
|
\param Search A substring to be searched for
|
||||||
\param Loc a locale used for case insensitive comparison
|
\param Loc A locale used for case insensitive comparison
|
||||||
*/
|
*/
|
||||||
template<typename SequenceT, typename CollectionT>
|
template<typename SequenceT, typename CollectionT>
|
||||||
inline void ierase_last(
|
inline void ierase_last(
|
||||||
@ -386,21 +373,19 @@ namespace boost {
|
|||||||
|
|
||||||
//! Erase nth algorithm
|
//! Erase nth algorithm
|
||||||
/*!
|
/*!
|
||||||
Remove the Nth match of the string in the input.
|
Remove the Nth occurence of the substring in the input.
|
||||||
The result is a modified copy of the input. It is returned as a sequence
|
The result is a modified copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator.
|
or copied to the output iterator.
|
||||||
|
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for
|
\param Search A substring to be searched for
|
||||||
\param Nth An index of the match to be replaced. The index is 0-based.
|
\param Nth An index of the match to be replaced. The index is 0-based.
|
||||||
\return An output iterator pointing just after last inserted character or
|
\return An output iterator pointing just after the last inserted character or
|
||||||
a modified copy of the input
|
a modified copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -437,11 +422,11 @@ namespace boost {
|
|||||||
|
|
||||||
//! Erase nth algorithm
|
//! Erase nth algorithm
|
||||||
/*!
|
/*!
|
||||||
Remove the Nth match of the string in the input.
|
Remove the Nth occurence of the substring in the input.
|
||||||
The input sequence is modified in-place.
|
The input sequence is modified in-place.
|
||||||
|
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for.
|
\param Search A substring to be searched for.
|
||||||
\param Nth An index of the match to be replaced. The index is 0-based.
|
\param Nth An index of the match to be replaced. The index is 0-based.
|
||||||
*/
|
*/
|
||||||
template<typename SequenceT, typename CollectionT>
|
template<typename SequenceT, typename CollectionT>
|
||||||
@ -460,22 +445,20 @@ namespace boost {
|
|||||||
|
|
||||||
//! Erase nth algorithm ( case insensitive )
|
//! Erase nth algorithm ( case insensitive )
|
||||||
/*!
|
/*!
|
||||||
Remove the Nth match of the string in the input.
|
Remove the Nth occurence of the substring in the input.
|
||||||
The result is a modified copy of the input. It is returned as a sequence
|
The result is a modified copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator.
|
or copied to the output iterator.
|
||||||
Searching is case insensitive.
|
Searching is case insensitive.
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for.
|
\param Search A substring to be searched for.
|
||||||
\param Nth An index of the match to be replaced. The index is 0-based.
|
\param Nth An index of the match to be replaced. The index is 0-based.
|
||||||
\param Loc a locale used for case insensitive comparison
|
\param Loc A locale used for case insensitive comparison
|
||||||
\return An output iterator pointing just after last inserted character or
|
\return An output iterator pointing just after the last inserted character or
|
||||||
a modified copy of the input
|
a modified copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -514,13 +497,13 @@ namespace boost {
|
|||||||
|
|
||||||
//! Erase nth algorithm
|
//! Erase nth algorithm
|
||||||
/*!
|
/*!
|
||||||
Remove the Nth match of the string in the input.
|
Remove the Nth occurence of the substring in the input.
|
||||||
The input sequence is modified in-place. Searching is case insensitive.
|
The input sequence is modified in-place. Searching is case insensitive.
|
||||||
|
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for.
|
\param Search A substring to be searched for.
|
||||||
\param Nth An index of the match to be replaced. The index is 0-based.
|
\param Nth An index of the match to be replaced. The index is 0-based.
|
||||||
\param Loc a locale used for case insensitive comparison
|
\param Loc A locale used for case insensitive comparison
|
||||||
*/
|
*/
|
||||||
template<typename SequenceT, typename CollectionT>
|
template<typename SequenceT, typename CollectionT>
|
||||||
inline void ierase_nth(
|
inline void ierase_nth(
|
||||||
@ -542,18 +525,16 @@ namespace boost {
|
|||||||
/*!
|
/*!
|
||||||
Remove all the occurrences of the string from the input.
|
Remove all the occurrences of the string from the input.
|
||||||
The result is a modified copy of the input. It is returned as a sequence
|
The result is a modified copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator.
|
or copied to the output iterator.
|
||||||
|
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input sequence
|
\param Input An input sequence
|
||||||
\param Search A string to be searched for.
|
\param Search A substring to be searched for.
|
||||||
\return An output iterator pointing just after last inserted character or
|
\return An output iterator pointing just after the last inserted character or
|
||||||
a modified copy of the input
|
a modified copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -592,7 +573,7 @@ namespace boost {
|
|||||||
The input sequence is modified in-place.
|
The input sequence is modified in-place.
|
||||||
|
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for.
|
\param Search A substring to be searched for.
|
||||||
*/
|
*/
|
||||||
template<typename SequenceT, typename CollectionT>
|
template<typename SequenceT, typename CollectionT>
|
||||||
inline void erase_all(
|
inline void erase_all(
|
||||||
@ -611,19 +592,17 @@ namespace boost {
|
|||||||
/*!
|
/*!
|
||||||
Remove all the occurrences of the string from the input.
|
Remove all the occurrences of the string from the input.
|
||||||
The result is a modified copy of the input. It is returned as a sequence
|
The result is a modified copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator.
|
or copied to the output iterator.
|
||||||
Searching is case insensitive.
|
Searching is case insensitive.
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for
|
\param Search A substring to be searched for
|
||||||
\param Loc a locale used for case insensitive comparison
|
\param Loc A locale used for case insensitive comparison
|
||||||
\return An output iterator pointing just after last inserted character or
|
\return An output iterator pointing just after the last inserted character or
|
||||||
a modified copy of the input
|
a modified copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -664,8 +643,8 @@ namespace boost {
|
|||||||
The input sequence is modified in-place. Searching is case insensitive.
|
The input sequence is modified in-place. Searching is case insensitive.
|
||||||
|
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for.
|
\param Search A substring to be searched for.
|
||||||
\param Loc a locale used for case insensitive comparison
|
\param Loc A locale used for case insensitive comparison
|
||||||
*/
|
*/
|
||||||
template<typename SequenceT, typename CollectionT>
|
template<typename SequenceT, typename CollectionT>
|
||||||
inline void ierase_all(
|
inline void ierase_all(
|
||||||
@ -683,21 +662,19 @@ namespace boost {
|
|||||||
|
|
||||||
//! Erase head algorithm
|
//! Erase head algorithm
|
||||||
/*!
|
/*!
|
||||||
Remove the head from the input. Head is a prefix of a seqence of given size.
|
Remove the head from the input. The head is a prefix of a seqence of given size.
|
||||||
If the sequence is shorter then required, whole sequence if
|
If the sequence is shorter then required, the whole string is
|
||||||
considered to be the head. The result is a modified copy of the input.
|
considered to be the head. The result is a modified copy of the input.
|
||||||
It is returned as a sequence or copied to an output iterator.
|
It is returned as a sequence or copied to the output iterator.
|
||||||
|
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param N A length of the head
|
\param N Length of the head
|
||||||
\return An output iterator pointing just after last inserted character or
|
\return An output iterator pointing just after the last inserted character or
|
||||||
a modified copy of the input
|
a modified copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -731,12 +708,12 @@ namespace boost {
|
|||||||
|
|
||||||
//! Erase head algorithm
|
//! Erase head algorithm
|
||||||
/*!
|
/*!
|
||||||
Remove the head from the input. Head is a prefix of a seqence of given size.
|
Remove the head from the input. The head is a prefix of a seqence of given size.
|
||||||
If the sequence is shorter then required, whole sequence if
|
If the sequence is shorter then required, the whole string is
|
||||||
considered to be the head. The input sequence is modified in-place.
|
considered to be the head. The input sequence is modified in-place.
|
||||||
|
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param N A length of the head
|
\param N Length of the head
|
||||||
*/
|
*/
|
||||||
template<typename SequenceT>
|
template<typename SequenceT>
|
||||||
inline void erase_head(
|
inline void erase_head(
|
||||||
@ -753,21 +730,19 @@ namespace boost {
|
|||||||
|
|
||||||
//! Erase tail algorithm
|
//! Erase tail algorithm
|
||||||
/*!
|
/*!
|
||||||
Remove the tail from the input. Tail is a suffix of a seqence of given size.
|
Remove the tail from the input. The tail is a suffix of a seqence of given size.
|
||||||
If the sequence is shorter then required, whole sequence if
|
If the sequence is shorter then required, the whole string is
|
||||||
considered to be the tail.
|
considered to be the tail.
|
||||||
The result is a modified copy of the input. It is returned as a sequence
|
The result is a modified copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator.
|
or copied to the output iterator.
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param N A length of the head
|
\param N Length of the head
|
||||||
\return An output iterator pointing just after last inserted character or
|
\return An output iterator pointing just after the last inserted character or
|
||||||
a modified copy of the input
|
a modified copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -801,12 +776,12 @@ namespace boost {
|
|||||||
|
|
||||||
//! Erase tail algorithm
|
//! Erase tail algorithm
|
||||||
/*!
|
/*!
|
||||||
Remove the tail from the input. Tail is a suffix of a seqence of given size.
|
Remove the tail from the input. The tail is a suffix of a seqence of given size.
|
||||||
If the sequence is shorter then required, whole sequence is
|
If the sequence is shorter then required, the whole string is
|
||||||
considered to be the tail. The input sequence is modified in-place.
|
considered to be the tail. The input sequence is modified in-place.
|
||||||
|
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param N A length of the head
|
\param N Length of the head
|
||||||
*/
|
*/
|
||||||
template<typename SequenceT>
|
template<typename SequenceT>
|
||||||
inline void erase_tail(
|
inline void erase_tail(
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
/*! \file
|
/*! \file
|
||||||
Defines a set of find algorithms. The algorithms are searching
|
Defines a set of find algorithms. The algorithms are searching
|
||||||
for a substring if the input. The result is given as an \c iterator_range
|
for a substring of the input. The result is given as an \c iterator_range
|
||||||
delimiting the substring.
|
delimiting the substring.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -54,19 +54,17 @@ namespace boost {
|
|||||||
|
|
||||||
//! Find first algorithm
|
//! Find first algorithm
|
||||||
/*!
|
/*!
|
||||||
Search for the first match of the string in the input.
|
Search for the first occurence of the substring in the input.
|
||||||
|
|
||||||
\param Input A string which will be searched.
|
\param Input A string which will be searched.
|
||||||
\param Search A string to be searched for.
|
\param Search A substring to be searched for.
|
||||||
\return
|
\return
|
||||||
An \c iterator_range delimiting the match.
|
An \c iterator_range delimiting the match.
|
||||||
Returned iterator is either \c CollectionT::iterator or
|
Returned iterator is either \c CollectionT::iterator or
|
||||||
\c CollectionT::const_iterator, depending on the constness of
|
\c CollectionT::const_iterator, depending on the constness of
|
||||||
the input parameter.
|
the input parameter.
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note This function provides the strong exception-safety guarantee
|
||||||
about exception safety, this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<typename Collection1T, typename Collection2T>
|
template<typename Collection1T, typename Collection2T>
|
||||||
inline iterator_range<
|
inline iterator_range<
|
||||||
@ -81,21 +79,19 @@ namespace boost {
|
|||||||
|
|
||||||
//! Find first algorithm ( case insensitive )
|
//! Find first algorithm ( case insensitive )
|
||||||
/*!
|
/*!
|
||||||
Search for the first match of the string in the input.
|
Search for the first occurence of the substring in the input.
|
||||||
Searching is case insensitive.
|
Searching is case insensitive.
|
||||||
|
|
||||||
\param Input A string which will be searched.
|
\param Input A string which will be searched.
|
||||||
\param Search A string to be searched for.
|
\param Search A substring to be searched for.
|
||||||
\param Loc a locale used for case insensitive comparison
|
\param Loc A locale used for case insensitive comparison
|
||||||
\return
|
\return
|
||||||
An \c iterator_range delimiting the match.
|
An \c iterator_range delimiting the match.
|
||||||
Returned iterator is either \c Collection1T::iterator or
|
Returned iterator is either \c Collection1T::iterator or
|
||||||
\c Collection1T::const_iterator, depending on the constness of
|
\c Collection1T::const_iterator, depending on the constness of
|
||||||
the input parameter.
|
the input parameter.
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note This function provides the strong exception-safety guarantee
|
||||||
about exception safety, this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<typename Collection1T, typename Collection2T>
|
template<typename Collection1T, typename Collection2T>
|
||||||
inline iterator_range<
|
inline iterator_range<
|
||||||
@ -113,19 +109,17 @@ namespace boost {
|
|||||||
|
|
||||||
//! Find last algorithm
|
//! Find last algorithm
|
||||||
/*!
|
/*!
|
||||||
Search for the last match of the string in the input.
|
Search for the last occurence of the substring in the input.
|
||||||
|
|
||||||
\param Input A string which will be searched.
|
\param Input A string which will be searched.
|
||||||
\param Search A string to be searched for.
|
\param Search A substring to be searched for.
|
||||||
\return
|
\return
|
||||||
An \c iterator_range delimiting the match.
|
An \c iterator_range delimiting the match.
|
||||||
Returned iterator is either \c Collection1T::iterator or
|
Returned iterator is either \c Collection1T::iterator or
|
||||||
\c Collection1T::const_iterator, depending on the constness of
|
\c Collection1T::const_iterator, depending on the constness of
|
||||||
the input parameter.
|
the input parameter.
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note This function provides the strong exception-safety guarantee
|
||||||
about exception safety, this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<typename Collection1T, typename Collection2T>
|
template<typename Collection1T, typename Collection2T>
|
||||||
inline iterator_range<
|
inline iterator_range<
|
||||||
@ -144,18 +138,16 @@ namespace boost {
|
|||||||
Searching is case insensitive.
|
Searching is case insensitive.
|
||||||
|
|
||||||
\param Input A string which will be searched.
|
\param Input A string which will be searched.
|
||||||
\param Search A string to be searched for.
|
\param Search A substring to be searched for.
|
||||||
\param Loc a locale used for case insensitive comparison
|
\param Loc A locale used for case insensitive comparison
|
||||||
\return
|
\return
|
||||||
An \c iterator_range delimiting the match.
|
An \c iterator_range delimiting the match.
|
||||||
Returned iterator is either \c Collection1T::iterator or
|
Returned iterator is either \c Collection1T::iterator or
|
||||||
\c Collection1T::const_iterator, depending on the constness of
|
\c Collection1T::const_iterator, depending on the constness of
|
||||||
the input parameter.
|
the input parameter.
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note This function provides the strong exception-safety guarantee
|
||||||
about exception safety, this function provides strong
|
*/
|
||||||
exception guarantee.
|
|
||||||
*/
|
|
||||||
template<typename Collection1T, typename Collection2T>
|
template<typename Collection1T, typename Collection2T>
|
||||||
inline iterator_range<
|
inline iterator_range<
|
||||||
BOOST_STRING_TYPENAME result_iterator_of<Collection1T>::type>
|
BOOST_STRING_TYPENAME result_iterator_of<Collection1T>::type>
|
||||||
@ -172,11 +164,11 @@ namespace boost {
|
|||||||
|
|
||||||
//! Find n-th algorithm
|
//! Find n-th algorithm
|
||||||
/*!
|
/*!
|
||||||
Search for the n-th (zero-indexed) match of the string in the
|
Search for the n-th (zero-indexed) occurence of the substring in the
|
||||||
input.
|
input.
|
||||||
|
|
||||||
\param Input A string which will be searched.
|
\param Input A string which will be searched.
|
||||||
\param Search A string to be searched for.
|
\param Search A substring to be searched for.
|
||||||
\param Nth An index (zero-indexed) of the match to be found.
|
\param Nth An index (zero-indexed) of the match to be found.
|
||||||
\return
|
\return
|
||||||
An \c iterator_range delimiting the match.
|
An \c iterator_range delimiting the match.
|
||||||
@ -198,13 +190,13 @@ namespace boost {
|
|||||||
|
|
||||||
//! Find n-th algorithm ( case insensitive ).
|
//! Find n-th algorithm ( case insensitive ).
|
||||||
/*!
|
/*!
|
||||||
Search for the n-th (zero-indexed) match of the string in the
|
Search for the n-th (zero-indexed) occurence of the substring in the
|
||||||
input. Searching is case insensitive.
|
input. Searching is case insensitive.
|
||||||
|
|
||||||
\param Input A string which will be searched.
|
\param Input A string which will be searched.
|
||||||
\param Search A string to be searched for.
|
\param Search A substring to be searched for.
|
||||||
\param Nth An index (zero-indexed) of the match to be found.
|
\param Nth An index (zero-indexed) of the match to be found.
|
||||||
\param Loc a locale used for case insensitive comparison
|
\param Loc A locale used for case insensitive comparison
|
||||||
\return
|
\return
|
||||||
An \c iterator_range delimiting the match.
|
An \c iterator_range delimiting the match.
|
||||||
Returned iterator is either \c Collection1T::iterator or
|
Returned iterator is either \c Collection1T::iterator or
|
||||||
@ -212,9 +204,7 @@ namespace boost {
|
|||||||
the input parameter.
|
the input parameter.
|
||||||
|
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note This function provides the strong exception-safety guarantee
|
||||||
about exception safety, this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<typename Collection1T, typename Collection2T>
|
template<typename Collection1T, typename Collection2T>
|
||||||
inline iterator_range<
|
inline iterator_range<
|
||||||
@ -238,16 +228,14 @@ namespace boost {
|
|||||||
to be the head.
|
to be the head.
|
||||||
|
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param N A length of the head
|
\param N Length of the head
|
||||||
\return
|
\return
|
||||||
An \c iterator_range delimiting the match.
|
An \c iterator_range delimiting the match.
|
||||||
Returned iterator is either \c Collection1T::iterator or
|
Returned iterator is either \c Collection1T::iterator or
|
||||||
\c Collection1T::const_iterator, depending on the constness of
|
\c Collection1T::const_iterator, depending on the constness of
|
||||||
the input parameter.
|
the input parameter.
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note This function provides the strong exception-safety guarantee
|
||||||
about exception safety, this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<typename CollectionT>
|
template<typename CollectionT>
|
||||||
inline iterator_range<
|
inline iterator_range<
|
||||||
@ -269,7 +257,7 @@ namespace boost {
|
|||||||
to be the tail.
|
to be the tail.
|
||||||
|
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param N A length of the tail
|
\param N Length of the tail
|
||||||
\return
|
\return
|
||||||
An \c iterator_range delimiting the match.
|
An \c iterator_range delimiting the match.
|
||||||
Returned iterator is either \c CollectionT::iterator or
|
Returned iterator is either \c CollectionT::iterator or
|
||||||
@ -277,10 +265,8 @@ namespace boost {
|
|||||||
the input parameter.
|
the input parameter.
|
||||||
|
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note This function provides the strong exception-safety guarantee
|
||||||
about exception safety, this function provides strong
|
*/
|
||||||
exception guarantee.
|
|
||||||
*/
|
|
||||||
template<typename CollectionT>
|
template<typename CollectionT>
|
||||||
inline iterator_range<
|
inline iterator_range<
|
||||||
BOOST_STRING_TYPENAME result_iterator_of<CollectionT>::type>
|
BOOST_STRING_TYPENAME result_iterator_of<CollectionT>::type>
|
||||||
@ -308,11 +294,9 @@ namespace boost {
|
|||||||
Returned iterator is either \c CollectionT::iterator or
|
Returned iterator is either \c CollectionT::iterator or
|
||||||
\c CollectionT::const_iterator, depending on the constness of
|
\c CollectionT::const_iterator, depending on the constness of
|
||||||
the input parameter.
|
the input parameter.
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note This function provides the strong exception-safety guarantee
|
||||||
about exception safety, this function provides strong
|
*/
|
||||||
exception guarantee.
|
|
||||||
*/
|
|
||||||
template<typename CollectionT, typename PredicateT>
|
template<typename CollectionT, typename PredicateT>
|
||||||
inline iterator_range<
|
inline iterator_range<
|
||||||
BOOST_STRING_TYPENAME result_iterator_of<CollectionT>::type>
|
BOOST_STRING_TYPENAME result_iterator_of<CollectionT>::type>
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
/*! \file
|
/*! \file
|
||||||
Defines generic replace algorithms. Each algorithm replaces
|
Defines generic replace algorithms. Each algorithm replaces
|
||||||
a part(s) of the input. The part to be replaced is looked up using a Finder object.
|
part(s) of the input. The part to be replaced is looked up using a Finder object.
|
||||||
Result of finding is then used by a Formatter object to generate the replacement.
|
Result of finding is then used by a Formatter object to generate the replacement.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -34,18 +34,16 @@ namespace boost {
|
|||||||
Use the Finder to search for a substring. Use the Formatter to format
|
Use the Finder to search for a substring. Use the Formatter to format
|
||||||
this substring and replace it in the input.
|
this substring and replace it in the input.
|
||||||
The result is a modified copy of the input. It is returned as a sequence
|
The result is a modified copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator.
|
or copied to the output iterator.
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input sequence
|
\param Input An input sequence
|
||||||
\param Finder A Finder object used to search for a match to be replaced
|
\param Finder A Finder object used to search for a match to be replaced
|
||||||
\param Formatter A Formatter object used to format a match
|
\param Formatter A Formatter object used to format a match
|
||||||
\return An output iterator pointing just after last inserted character or
|
\return An output iterator pointing just after the last inserted character or
|
||||||
a modified copy of the input
|
a modified copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -147,18 +145,16 @@ namespace boost {
|
|||||||
this substring and replace it in the input. Repeat this for all matching
|
this substring and replace it in the input. Repeat this for all matching
|
||||||
substrings.
|
substrings.
|
||||||
The result is a modified copy of the input. It is returned as a sequence
|
The result is a modified copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator.
|
or copied to the output iterator.
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input sequence
|
\param Input An input sequence
|
||||||
\param Finder A Finder object used to search for a match to be replaced
|
\param Finder A Finder object used to search for a match to be replaced
|
||||||
\param Formatter A Formatter object used to format a match
|
\param Formatter A Formatter object used to format a match
|
||||||
\return An output iterator pointing just after last inserted character or
|
\return An output iterator pointing just after the last inserted character or
|
||||||
a modified copy of the input
|
a modified copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
|
|
||||||
/*! \file
|
/*! \file
|
||||||
Defines find iterator classes. Find iterator repeatly applies a Finder
|
Defines find iterator classes. Find iterator repeatly applies a Finder
|
||||||
on a specified input string to search for matches. Dereferencing
|
to the specified input string to search for matches. Dereferencing
|
||||||
the iterator yields the current match or a range between last and current
|
the iterator yields the current match or a range between the last and the current
|
||||||
match depending on the iterator used.
|
match depending on the iterator used.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -32,10 +32,10 @@ namespace boost {
|
|||||||
//! find_iterator
|
//! find_iterator
|
||||||
/*!
|
/*!
|
||||||
Find iterator encapsulates a Finder and allows
|
Find iterator encapsulates a Finder and allows
|
||||||
an incremental searching in a string.
|
for incremental searching in a string.
|
||||||
Each increment moves the iterator to the next match.
|
Each increment moves the iterator to the next match.
|
||||||
|
|
||||||
Find iterator is readable forward traversal iterator.
|
Find iterator is a readable forward traversal iterator.
|
||||||
|
|
||||||
Dereferencing the iterator yields an iterator_range delimiting
|
Dereferencing the iterator yields an iterator_range delimiting
|
||||||
the current match.
|
the current match.
|
||||||
@ -152,7 +152,7 @@ namespace boost {
|
|||||||
|
|
||||||
//! Eof check
|
//! Eof check
|
||||||
/*!
|
/*!
|
||||||
Check the eof condition. Eof condition means, that
|
Check the eof condition. Eof condition means that
|
||||||
there is nothing more to be searched i.e. find_iterator
|
there is nothing more to be searched i.e. find_iterator
|
||||||
is after the last match.
|
is after the last match.
|
||||||
*/
|
*/
|
||||||
@ -192,11 +192,11 @@ namespace boost {
|
|||||||
//! split_iterator
|
//! split_iterator
|
||||||
/*!
|
/*!
|
||||||
Split iterator encapsulates a Finder and allows
|
Split iterator encapsulates a Finder and allows
|
||||||
an incremental searching in a string.
|
for incremental searching in a string.
|
||||||
Unlike the find iterator, split iterator iterates
|
Unlike the find iterator, split iterator iterates
|
||||||
through gasps between matches.
|
through gaps between matches.
|
||||||
|
|
||||||
Find iterator is readable forward traversal iterator.
|
Find iterator is a readable forward traversal iterator.
|
||||||
|
|
||||||
Dereferencing the iterator yields an iterator_range delimiting
|
Dereferencing the iterator yields an iterator_range delimiting
|
||||||
the current match.
|
the current match.
|
||||||
@ -318,7 +318,7 @@ namespace boost {
|
|||||||
|
|
||||||
//! Eof check
|
//! Eof check
|
||||||
/*!
|
/*!
|
||||||
Check the eof condition. Eof condition means, that
|
Check the eof condition. Eof condition means that
|
||||||
there is nothing more to be searched i.e. find_iterator
|
there is nothing more to be searched i.e. find_iterator
|
||||||
is after the last match.
|
is after the last match.
|
||||||
*/
|
*/
|
||||||
|
@ -34,9 +34,9 @@ namespace boost {
|
|||||||
/*!
|
/*!
|
||||||
Construct the \c first_finder. The finder searches for the first
|
Construct the \c first_finder. The finder searches for the first
|
||||||
occurrence of the string in a given input.
|
occurrence of the string in a given input.
|
||||||
The result is given as a \c iterator_range delimiting the match.
|
The result is given as an \c iterator_range delimiting the match.
|
||||||
|
|
||||||
\param Search A string to be searched for.
|
\param Search A substring to be searched for.
|
||||||
\param Comp An element comparison predicate
|
\param Comp An element comparison predicate
|
||||||
\return An instance of the \c first_finder object
|
\return An instance of the \c first_finder object
|
||||||
*/
|
*/
|
||||||
@ -75,9 +75,9 @@ namespace boost {
|
|||||||
/*!
|
/*!
|
||||||
Construct the \c last_finder. The finder searches for the last
|
Construct the \c last_finder. The finder searches for the last
|
||||||
occurrence of the string in a given input.
|
occurrence of the string in a given input.
|
||||||
The result is given as a \c iterator_range delimiting the match.
|
The result is given as an \c iterator_range delimiting the match.
|
||||||
|
|
||||||
\param Search A string to be searched for.
|
\param Search A substring to be searched for.
|
||||||
\param Comp An element comparison predicate
|
\param Comp An element comparison predicate
|
||||||
\return An instance of the \c last_finder object
|
\return An instance of the \c last_finder object
|
||||||
*/
|
*/
|
||||||
@ -114,9 +114,9 @@ namespace boost {
|
|||||||
/*!
|
/*!
|
||||||
Construct the \c nth_finder. The finder searches for the n-th (zero-indexed)
|
Construct the \c nth_finder. The finder searches for the n-th (zero-indexed)
|
||||||
occurrence of the string in a given input.
|
occurrence of the string in a given input.
|
||||||
The result is given as a \c iterator_range delimiting the match.
|
The result is given as an \c iterator_range delimiting the match.
|
||||||
|
|
||||||
\param Search A string to be searched for.
|
\param Search A substring to be searched for.
|
||||||
\param Nth An index of the match to be find
|
\param Nth An index of the match to be find
|
||||||
\param Comp An element comparison predicate
|
\param Comp An element comparison predicate
|
||||||
\return An instance of the \c nth_finder object
|
\return An instance of the \c nth_finder object
|
||||||
@ -158,10 +158,10 @@ namespace boost {
|
|||||||
//! "Head" finder
|
//! "Head" finder
|
||||||
/*!
|
/*!
|
||||||
Construct the \c head_finder. The finder returns a head of a given
|
Construct the \c head_finder. The finder returns a head of a given
|
||||||
input. Head is a prefix of a string up to n elements in
|
input. The head is a prefix of a string up to n elements in
|
||||||
size. If an input has less then n elements, whole input is
|
size. If an input has less then n elements, whole input is
|
||||||
considered a head.
|
considered a head.
|
||||||
The result is given as a \c iterator_range delimiting the match.
|
The result is given as an \c iterator_range delimiting the match.
|
||||||
|
|
||||||
\param N The size of the head
|
\param N The size of the head
|
||||||
\return An instance of the \c head_finder object
|
\return An instance of the \c head_finder object
|
||||||
@ -175,10 +175,10 @@ namespace boost {
|
|||||||
//! "Tail" finder
|
//! "Tail" finder
|
||||||
/*!
|
/*!
|
||||||
Construct the \c tail_finder. The finder returns a tail of a given
|
Construct the \c tail_finder. The finder returns a tail of a given
|
||||||
input. Tail is a suffix of a string up to n elements in
|
input. The tail is a suffix of a string up to n elements in
|
||||||
size. If an input has less then n elements, whole input is
|
size. If an input has less then n elements, whole input is
|
||||||
considered a head.
|
considered a head.
|
||||||
The result is given as a \c iterator_range delimiting the match.
|
The result is given as an \c iterator_range delimiting the match.
|
||||||
|
|
||||||
\param N The size of the head
|
\param N The size of the head
|
||||||
\return An instance of the \c tail_finder object
|
\return An instance of the \c tail_finder object
|
||||||
@ -201,7 +201,7 @@ namespace boost {
|
|||||||
search for continuous segments of characters satisfying the
|
search for continuous segments of characters satisfying the
|
||||||
given predicate.
|
given predicate.
|
||||||
|
|
||||||
The result is given as a \c iterator_range delimiting the match.
|
The result is given as an \c iterator_range delimiting the match.
|
||||||
|
|
||||||
\param Pred An element selection predicate
|
\param Pred An element selection predicate
|
||||||
\param eCompress Compress flag
|
\param eCompress Compress flag
|
||||||
|
@ -16,13 +16,13 @@
|
|||||||
#include <boost/algorithm/string/detail/formatter.hpp>
|
#include <boost/algorithm/string/detail/formatter.hpp>
|
||||||
|
|
||||||
/*! \file
|
/*! \file
|
||||||
Defines formatter generators. Formatter is a functor which formats
|
Defines Formatter generators. Formatter is a functor which formats
|
||||||
a string according to give parameters. A Formatter works
|
a string according to given parameters. A Formatter works
|
||||||
in conjunction with a Finder. A Finder can provide additional information
|
in conjunction with a Finder. A Finder can provide additional information
|
||||||
for a specific Formatter. An example of such a cooperation is reger_finder
|
for a specific Formatter. An example of such a cooperation is regex_finder
|
||||||
and regex_formatter.
|
and regex_formatter.
|
||||||
|
|
||||||
Formatters are used by as a pluggable components for replace facilities.
|
Formatters are used as pluggable components for replace facilities.
|
||||||
This header contains generator functions for the Formatters provided in this library.
|
This header contains generator functions for the Formatters provided in this library.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
to extracted parts.
|
to extracted parts.
|
||||||
|
|
||||||
There are two algorithms provided. One iterates over matching
|
There are two algorithms provided. One iterates over matching
|
||||||
substrings, the other one over the gasps between these matches.
|
substrings, the other one over the gaps between these matches.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
@ -55,7 +55,7 @@ namespace boost {
|
|||||||
\param Finder A Finder object used for searching
|
\param Finder A Finder object used for searching
|
||||||
\return A reference the result
|
\return A reference the result
|
||||||
|
|
||||||
\note Prior content of the result will be overridden.
|
\note Prior content of the result will be overwritten.
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename SequenceSequenceT,
|
typename SequenceSequenceT,
|
||||||
@ -122,7 +122,7 @@ namespace boost {
|
|||||||
\param Finder A finder object used for searching
|
\param Finder A finder object used for searching
|
||||||
\return A reference the result
|
\return A reference the result
|
||||||
|
|
||||||
\note Prior content of the result will be overridden.
|
\note Prior content of the result will be overwritten.
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename SequenceSequenceT,
|
typename SequenceSequenceT,
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
|
|
||||||
/*! \file
|
/*! \file
|
||||||
Defines the \c iterator_class and related functions.
|
Defines the \c iterator_class and related functions.
|
||||||
\c iterator_range is a simple wrapper of iterator pair idiom. It provides
|
\c iterator_range is a simple wrapper of the iterator pair idiom. It provides
|
||||||
a rich subset of Container interface.
|
a rich subset of the Container interface.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
@ -32,7 +32,7 @@ namespace boost {
|
|||||||
/*!
|
/*!
|
||||||
An \c iterator_range delimits a range in a sequence by beginning and ending iterators.
|
An \c iterator_range delimits a range in a sequence by beginning and ending iterators.
|
||||||
An iterator_range can be passed to an algorithm which requires a sequence as an input.
|
An iterator_range can be passed to an algorithm which requires a sequence as an input.
|
||||||
For example, the \c toupper() function may be used most frequently on strings,
|
For example, the \c toupper() function may most frequently be used on strings,
|
||||||
but can also be used on iterator_ranges:
|
but can also be used on iterator_ranges:
|
||||||
|
|
||||||
\code
|
\code
|
||||||
@ -40,7 +40,7 @@ namespace boost {
|
|||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
Many algorithms working with sequences take a pair of iterators,
|
Many algorithms working with sequences take a pair of iterators,
|
||||||
delimiting a working range, as an arguments. The \c iterator_range class is an
|
delimiting a working range, as arguments. The \c iterator_range class is an
|
||||||
encapsulation of a range identified by a pair of iterators.
|
encapsulation of a range identified by a pair of iterators.
|
||||||
It provides a collection interface,
|
It provides a collection interface,
|
||||||
so it is possible to pass an instance to an algorithm requiring a collection as an input.
|
so it is possible to pass an instance to an algorithm requiring a collection as an input.
|
||||||
@ -149,7 +149,7 @@ namespace boost {
|
|||||||
|
|
||||||
//! Empty container test
|
//! Empty container test
|
||||||
/*!
|
/*!
|
||||||
Test whenever the range is empty
|
Test whether the range is empty
|
||||||
*/
|
*/
|
||||||
bool empty() const
|
bool empty() const
|
||||||
{
|
{
|
||||||
@ -177,7 +177,7 @@ namespace boost {
|
|||||||
|
|
||||||
//! Safe bool conversion
|
//! Safe bool conversion
|
||||||
/*!
|
/*!
|
||||||
Check whenever the range is empty.
|
Check whether the range is empty.
|
||||||
Allows to use construction like this:
|
Allows to use construction like this:
|
||||||
\code
|
\code
|
||||||
iterator_range r;
|
iterator_range r;
|
||||||
|
@ -18,14 +18,13 @@
|
|||||||
|
|
||||||
/*! \file boost/algorithm/string/predicate.hpp
|
/*! \file boost/algorithm/string/predicate.hpp
|
||||||
Defines string-related predicates.
|
Defines string-related predicates.
|
||||||
The predicates are resolving if a substring is contained in the input string
|
The predicates determine whether a substring is contained in the input string
|
||||||
under various conditions. If a string starts with the substring, ends with the
|
under various conditions: a string starts with the substring, ends with the
|
||||||
substring, simply contains the substring or if both strings are equal.
|
substring, simply contains the substring or if both strings are equal.
|
||||||
In addition the algorithm \c all() checks all elements of a container to satisfy a
|
Additionaly the algorithm \c all() checks all elements of a container to satisfy a
|
||||||
condition.
|
condition.
|
||||||
|
|
||||||
All predicates provide strong exception guarantee if input parameters satisfy
|
All predicates provide the strong exception guarantee.
|
||||||
second assumption about exception safety.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
@ -36,19 +35,17 @@ namespace boost {
|
|||||||
//! 'Starts with' predicate
|
//! 'Starts with' predicate
|
||||||
/*!
|
/*!
|
||||||
This predicate holds when the test collection is a prefix of the Input.
|
This predicate holds when the test collection is a prefix of the Input.
|
||||||
In other word, if the input starts with the test.
|
In other words, if the input starts with the test.
|
||||||
When optional predicate is specified, it is used for character-wise
|
When the optional predicate is specified, it is used for character-wise
|
||||||
comparison.
|
comparison.
|
||||||
|
|
||||||
\param Input An input sequence
|
\param Input An input sequence
|
||||||
\param Test A test sequence
|
\param Test A test sequence
|
||||||
\param Comp An element comparison predicate
|
\param Comp An element comparison predicate
|
||||||
\return A result of the test
|
\return The result of the test
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note This function provides the strong exception-safety guarantee
|
||||||
about exception safety, this function provides strong
|
*/
|
||||||
exception guarantee.
|
|
||||||
*/
|
|
||||||
template<typename Collection1T, typename Collection2T, typename PredicateT>
|
template<typename Collection1T, typename Collection2T, typename PredicateT>
|
||||||
inline bool starts_with(
|
inline bool starts_with(
|
||||||
const Collection1T& Input,
|
const Collection1T& Input,
|
||||||
@ -91,17 +88,15 @@ namespace boost {
|
|||||||
//! 'Starts with' predicate ( case insensitive )
|
//! 'Starts with' predicate ( case insensitive )
|
||||||
/*!
|
/*!
|
||||||
This predicate holds when the test container is a prefix of the Input.
|
This predicate holds when the test container is a prefix of the Input.
|
||||||
In other word, if the input starts with the test.
|
In other words, if the input starts with the test.
|
||||||
Elements are compared case insensitively.
|
Elements are compared case insensitively.
|
||||||
|
|
||||||
\param Input An input sequence
|
\param Input An input sequence
|
||||||
\param Test A test sequence
|
\param Test A test sequence
|
||||||
\param Loc a locale used for case insensitive comparison
|
\param Loc A locale used for case insensitive comparison
|
||||||
\return A result of the test
|
\return The result of the test
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note This function provides the strong exception-safety guarantee
|
||||||
about exception safety, this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<typename Collection1T, typename Collection2T>
|
template<typename Collection1T, typename Collection2T>
|
||||||
inline bool istarts_with(
|
inline bool istarts_with(
|
||||||
@ -118,19 +113,17 @@ namespace boost {
|
|||||||
//! 'Ends with' predicate
|
//! 'Ends with' predicate
|
||||||
/*!
|
/*!
|
||||||
This predicate holds when the test container is a suffix of the Input.
|
This predicate holds when the test container is a suffix of the Input.
|
||||||
In other word, if the input ends with the test.
|
In other words, if the input ends with the test.
|
||||||
When optional predicate is specified, it is used for character-wise
|
When the optional predicate is specified, it is used for character-wise
|
||||||
comparison.
|
comparison.
|
||||||
|
|
||||||
|
|
||||||
\param Input An input sequence
|
\param Input An input sequence
|
||||||
\param Test A test sequence
|
\param Test A test sequence
|
||||||
\param Comp An element comparison predicate
|
\param Comp An element comparison predicate
|
||||||
\return A result of the test
|
\return The result of the test
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note This function provides the strong exception-safety guarantee
|
||||||
about exception safety, this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<typename Collection1T, typename Collection2T, typename PredicateT>
|
template<typename Collection1T, typename Collection2T, typename PredicateT>
|
||||||
inline bool ends_with(
|
inline bool ends_with(
|
||||||
@ -169,17 +162,15 @@ namespace boost {
|
|||||||
//! 'Ends with' predicate ( case insensitive )
|
//! 'Ends with' predicate ( case insensitive )
|
||||||
/*!
|
/*!
|
||||||
This predicate holds when the test container is a suffix of the Input.
|
This predicate holds when the test container is a suffix of the Input.
|
||||||
In other word, if the input ends with the test.
|
In other words, if the input ends with the test.
|
||||||
Elements are compared case insensitively.
|
Elements are compared case insensitively.
|
||||||
|
|
||||||
\param Input An input sequence
|
\param Input An input sequence
|
||||||
\param Test A test sequence
|
\param Test A test sequence
|
||||||
\param Loc a locale used for case insensitive comparison
|
\param Loc A locale used for case insensitive comparison
|
||||||
\return A result of the test
|
\return The result of the test
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note This function provides the strong exception-safety guarantee
|
||||||
about exception safety, this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<typename Collection1T, typename Collection2T>
|
template<typename Collection1T, typename Collection2T>
|
||||||
inline bool iends_with(
|
inline bool iends_with(
|
||||||
@ -195,17 +186,15 @@ namespace boost {
|
|||||||
//! 'Contains' predicate
|
//! 'Contains' predicate
|
||||||
/*!
|
/*!
|
||||||
This predicate holds when the test container is contained in the Input.
|
This predicate holds when the test container is contained in the Input.
|
||||||
When optional predicate is specified, it is used for character-wise
|
When the optional predicate is specified, it is used for character-wise
|
||||||
comparison.
|
comparison.
|
||||||
|
|
||||||
\param Input An input sequence
|
\param Input An input sequence
|
||||||
\param Test A test sequence
|
\param Test A test sequence
|
||||||
\param Comp An element comparison predicate
|
\param Comp An element comparison predicate
|
||||||
\return A result of the test
|
\return The result of the test
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note This function provides the strong exception-safety guarantee
|
||||||
about exception safety, this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<typename Collection1T, typename Collection2T, typename PredicateT>
|
template<typename Collection1T, typename Collection2T, typename PredicateT>
|
||||||
inline bool contains(
|
inline bool contains(
|
||||||
@ -241,12 +230,10 @@ namespace boost {
|
|||||||
|
|
||||||
\param Input An input sequence
|
\param Input An input sequence
|
||||||
\param Test A test sequence
|
\param Test A test sequence
|
||||||
\param Loc a locale used for case insensitive comparison
|
\param Loc A locale used for case insensitive comparison
|
||||||
\return A result of the test
|
\return The result of the test
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note This function provides the strong exception-safety guarantee
|
||||||
about exception safety, this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<typename Collection1T, typename Collection2T>
|
template<typename Collection1T, typename Collection2T>
|
||||||
inline bool icontains(
|
inline bool icontains(
|
||||||
@ -263,19 +250,17 @@ namespace boost {
|
|||||||
/*!
|
/*!
|
||||||
This predicate holds when the test container is equal to the
|
This predicate holds when the test container is equal to the
|
||||||
input container i.e. all elements in both containers are same.
|
input container i.e. all elements in both containers are same.
|
||||||
When optional predicate is specified, it is used for character-wise
|
When the optional predicate is specified, it is used for character-wise
|
||||||
comparison.
|
comparison.
|
||||||
|
|
||||||
\param Input An input sequence
|
\param Input An input sequence
|
||||||
\param Test A test sequence
|
\param Test A test sequence
|
||||||
\param Comp An element comparison predicate
|
\param Comp An element comparison predicate
|
||||||
\return A result of the test
|
\return The result of the test
|
||||||
|
|
||||||
\note This is two-way version of \c std::equal algorithm
|
\note This is a two-way version of \c std::equal algorithm
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note This function provides the strong exception-safety guarantee
|
||||||
about exception safety, this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<typename Collection1T, typename Collection2T, typename PredicateT>
|
template<typename Collection1T, typename Collection2T, typename PredicateT>
|
||||||
inline bool equals(
|
inline bool equals(
|
||||||
@ -324,14 +309,12 @@ namespace boost {
|
|||||||
|
|
||||||
\param Input An input sequence
|
\param Input An input sequence
|
||||||
\param Test A test sequence
|
\param Test A test sequence
|
||||||
\param Loc a locale used for case insensitive comparison
|
\param Loc A locale used for case insensitive comparison
|
||||||
\return A result of the test
|
\return The result of the test
|
||||||
|
|
||||||
\note This is two-way version of \c std::equal algorithm
|
\note This is a two-way version of \c std::equal algorithm
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note This function provides the strong exception-safety guarantee
|
||||||
about exception safety, this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<typename Collection1T, typename Collection2T>
|
template<typename Collection1T, typename Collection2T>
|
||||||
inline bool iequals(
|
inline bool iequals(
|
||||||
@ -351,11 +334,9 @@ namespace boost {
|
|||||||
|
|
||||||
\param Input An input sequence
|
\param Input An input sequence
|
||||||
\param Pred A predicate
|
\param Pred A predicate
|
||||||
\return A result of the test
|
\return The result of the test
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note This function provides the strong exception-safety guarantee
|
||||||
about exception safety, this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<typename CollectionT, typename PredicateT>
|
template<typename CollectionT, typename PredicateT>
|
||||||
inline bool all(
|
inline bool all(
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <boost/algorithm/string/iter_find.hpp>
|
#include <boost/algorithm/string/iter_find.hpp>
|
||||||
|
|
||||||
/*! \file
|
/*! \file
|
||||||
Defines regex variant of the algorithms.
|
Defines regex variants of the algorithms.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
@ -41,9 +41,7 @@ namespace boost {
|
|||||||
\c InputContainerT::const_iterator, depending on the constness of
|
\c InputContainerT::const_iterator, depending on the constness of
|
||||||
the input parameter.
|
the input parameter.
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note This function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename CollectionT,
|
typename CollectionT,
|
||||||
@ -67,19 +65,17 @@ namespace boost {
|
|||||||
Search for a substring matching given regex and format it with
|
Search for a substring matching given regex and format it with
|
||||||
the specified format.
|
the specified format.
|
||||||
The result is a modified copy of the input. It is returned as a sequence
|
The result is a modified copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator.
|
or copied to the output iterator.
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Rx A regular expression
|
\param Rx A regular expression
|
||||||
\param Format Regex format definition
|
\param Format Regex format definition
|
||||||
\param Flags Regex options
|
\param Flags Regex options
|
||||||
\return An output iterator pointing just after last inserted character or
|
\return An output iterator pointing just after the last inserted character or
|
||||||
a modified copy of the input
|
a modified copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -155,19 +151,17 @@ namespace boost {
|
|||||||
/*!
|
/*!
|
||||||
Format all substrings, matching given regex, with the specified format.
|
Format all substrings, matching given regex, with the specified format.
|
||||||
The result is a modified copy of the input. It is returned as a sequence
|
The result is a modified copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator.
|
or copied to the output iterator.
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Rx A regular expression
|
\param Rx A regular expression
|
||||||
\param Format Regex format definition
|
\param Format Regex format definition
|
||||||
\param Flags Regex options
|
\param Flags Regex options
|
||||||
\return An output iterator pointing just after last inserted character or
|
\return An output iterator pointing just after the last inserted character or
|
||||||
a modified copy of the input
|
a modified copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -243,18 +237,16 @@ namespace boost {
|
|||||||
/*!
|
/*!
|
||||||
Remove a substring matching given regex from the input.
|
Remove a substring matching given regex from the input.
|
||||||
The result is a modified copy of the input. It is returned as a sequence
|
The result is a modified copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator.
|
or copied to the output iterator.
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Rx A regular expression
|
\param Rx A regular expression
|
||||||
\param Flags Regex options
|
\param Flags Regex options
|
||||||
\return An output iterator pointing just after last inserted character or
|
\return An output iterator pointing just after the last inserted character or
|
||||||
a modified copy of the input
|
a modified copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -323,19 +315,17 @@ namespace boost {
|
|||||||
/*!
|
/*!
|
||||||
Erase all substrings, matching given regex, from the input.
|
Erase all substrings, matching given regex, from the input.
|
||||||
The result is a modified copy of the input. It is returned as a sequence
|
The result is a modified copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator.
|
or copied to the output iterator.
|
||||||
|
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Rx A regular expression
|
\param Rx A regular expression
|
||||||
\param Flags Regex options
|
\param Flags Regex options
|
||||||
\return An output iterator pointing just after last inserted character or
|
\return An output iterator pointing just after the last inserted character or
|
||||||
a modified copy of the input
|
a modified copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -408,7 +398,7 @@ namespace boost {
|
|||||||
Each part is copied and added as a new element to the output container.
|
Each part is copied and added as a new element to the output container.
|
||||||
Thus the result container must be able to hold copies
|
Thus the result container must be able to hold copies
|
||||||
of the matches (in a compatible structure like std::string) or
|
of the matches (in a compatible structure like std::string) or
|
||||||
a reference to it (f.e. using the iterator range class).
|
a reference to it (e.g. using the iterator range class).
|
||||||
Examples of such a container are \c std::vector<std::string>
|
Examples of such a container are \c std::vector<std::string>
|
||||||
or \c std::list<boost::iterator_range<std::string::iterator>>
|
or \c std::list<boost::iterator_range<std::string::iterator>>
|
||||||
|
|
||||||
@ -418,12 +408,10 @@ namespace boost {
|
|||||||
\param Flags Regex options
|
\param Flags Regex options
|
||||||
\return A reference to the result
|
\return A reference to the result
|
||||||
|
|
||||||
\note Prior content of the result will be overridden.
|
\note Prior content of the result will be overwritten.
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note This function provides the strong exception-safety guarantee
|
||||||
about exception safety and result's container swap() method have strong exception guarantee,
|
*/
|
||||||
this function provides strong exception guarantee.
|
|
||||||
*/
|
|
||||||
template<
|
template<
|
||||||
typename SequenceSequenceT,
|
typename SequenceSequenceT,
|
||||||
typename CollectionT,
|
typename CollectionT,
|
||||||
@ -445,13 +433,13 @@ namespace boost {
|
|||||||
|
|
||||||
//! Split regex algorithm
|
//! Split regex algorithm
|
||||||
/*!
|
/*!
|
||||||
Tokenize expression. This function is equivalent of C strtok. Input
|
Tokenize expression. This function is equivalent to C strtok. Input
|
||||||
sequence is split into tokens, separated by separators. Separator
|
sequence is split into tokens, separated by separators. Separator
|
||||||
is an every match of the given regex.
|
is an every match of the given regex.
|
||||||
Each part is copied and added as a new element to the output container.
|
Each part is copied and added as a new element to the output container.
|
||||||
Thus the result container must be able to hold copies
|
Thus the result container must be able to hold copies
|
||||||
of the matches (in a compatible structure like std::string) or
|
of the matches (in a compatible structure like std::string) or
|
||||||
a reference to it (f.e. using the iterator range class).
|
a reference to it (e.g. using the iterator range class).
|
||||||
Examples of such a container are \c std::vector<std::string>
|
Examples of such a container are \c std::vector<std::string>
|
||||||
or \c std::list<boost::iterator_range<std::string::iterator>>
|
or \c std::list<boost::iterator_range<std::string::iterator>>
|
||||||
|
|
||||||
@ -461,11 +449,9 @@ namespace boost {
|
|||||||
\param Flags Regex options
|
\param Flags Regex options
|
||||||
\return A reference to the result
|
\return A reference to the result
|
||||||
|
|
||||||
\note Prior content of the result will be overridden.
|
\note Prior content of the result will be overwritten.
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note This function provides the strong exception-safety guarantee
|
||||||
about exception safety and result's container swap() method have strong exception guarantee,
|
|
||||||
this function provides strong exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename SequenceSequenceT,
|
typename SequenceSequenceT,
|
||||||
|
@ -16,9 +16,9 @@
|
|||||||
#include <boost/algorithm/string/detail/formatter_regex.hpp>
|
#include <boost/algorithm/string/detail/formatter_regex.hpp>
|
||||||
|
|
||||||
/*! \file
|
/*! \file
|
||||||
Defines the \c refex_finder and \c regex_formatter generators. These two functors
|
Defines the \c regex_finder and \c regex_formatter generators. These two functors
|
||||||
are designed to work together. \c regex_formatter uses additional information
|
are designed to work together. \c regex_formatter uses additional information
|
||||||
about a match contained in the reger_finder search result.
|
about a match contained in the regex_finder search result.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
@ -28,7 +28,7 @@ namespace boost {
|
|||||||
|
|
||||||
//! "Regex" finder
|
//! "Regex" finder
|
||||||
/*!
|
/*!
|
||||||
Construct the \c regex_finder. Finder uses regex engine to search
|
Construct the \c regex_finder. Finder uses the regex engine to search
|
||||||
for a match.
|
for a match.
|
||||||
Result is given in \c regex_search_result. This is an extension
|
Result is given in \c regex_search_result. This is an extension
|
||||||
of the iterator_range. In addition it containes match results
|
of the iterator_range. In addition it containes match results
|
||||||
@ -55,7 +55,7 @@ namespace boost {
|
|||||||
|
|
||||||
//! Regex formatter
|
//! Regex formatter
|
||||||
/*!
|
/*!
|
||||||
Construct the \c regex_formatter. Regex formatter uses regex engine to
|
Construct the \c regex_formatter. Regex formatter uses the regex engine to
|
||||||
format a match found by the \c regex_finder.
|
format a match found by the \c regex_finder.
|
||||||
This formatted it designed to closely cooperate with \c regex_finder.
|
This formatted it designed to closely cooperate with \c regex_finder.
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
/*! \file
|
/*! \file
|
||||||
Defines various replace algorithms. Each algorithm replaces
|
Defines various replace algorithms. Each algorithm replaces
|
||||||
a part(s) of the input according to a searching and a replace criteria.
|
part(s) of the input according to set of searching and replace criteria.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
@ -32,18 +32,16 @@ namespace boost {
|
|||||||
/*!
|
/*!
|
||||||
Replace the given range in the input string.
|
Replace the given range in the input string.
|
||||||
The result is a modified copy of the input. It is returned as a sequence
|
The result is a modified copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator.
|
or copied to the output iterator.
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param SearchRange A range in the input to be substituted
|
\param SearchRange A range in the input to be substituted
|
||||||
\param Format A substitute string
|
\param Format A substitute string
|
||||||
\return An output iterator pointing just after last inserted character or
|
\return An output iterator pointing just after the last inserted character or
|
||||||
a modified copy of the input
|
a modified copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -109,21 +107,19 @@ namespace boost {
|
|||||||
|
|
||||||
//! Replace first algorithm
|
//! Replace first algorithm
|
||||||
/*!
|
/*!
|
||||||
Replace the first match of the search string in the input
|
Replace the first match of the search substring in the input
|
||||||
with the format string.
|
with the format string.
|
||||||
The result is a modified copy of the input. It is returned as a sequence
|
The result is a modified copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator.
|
or copied to the output iterator.
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for
|
\param Search A substring to be searched for
|
||||||
\param Format A substitute string
|
\param Format A substitute string
|
||||||
\return An output iterator pointing just after last inserted character or
|
\return An output iterator pointing just after the last inserted character or
|
||||||
a modified copy of the input
|
a modified copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -161,11 +157,11 @@ namespace boost {
|
|||||||
|
|
||||||
//! Replace first algorithm
|
//! Replace first algorithm
|
||||||
/*!
|
/*!
|
||||||
replace the first match of the search string in the input
|
replace the first match of the search substring in the input
|
||||||
with the format string. The input sequence is modified in-place.
|
with the format string. The input sequence is modified in-place.
|
||||||
|
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for
|
\param Search A substring to be searched for
|
||||||
\param Format A substitute string
|
\param Format A substitute string
|
||||||
*/
|
*/
|
||||||
template<typename SequenceT, typename Collection1T, typename Collection2T>
|
template<typename SequenceT, typename Collection1T, typename Collection2T>
|
||||||
@ -184,24 +180,21 @@ namespace boost {
|
|||||||
|
|
||||||
//! Replace first algorithm ( case insensitive )
|
//! Replace first algorithm ( case insensitive )
|
||||||
/*!
|
/*!
|
||||||
Replace the first match of the search string in the input
|
Replace the first match of the search substring in the input
|
||||||
with the format string.
|
with the format string.
|
||||||
The result is a modified copy of the input. It is returned as a sequence
|
The result is a modified copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator.
|
or copied to the output iterator.
|
||||||
Searching is case insensitive.
|
Searching is case insensitive.
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for
|
\param Search A substring to be searched for
|
||||||
\param Format A substitute string
|
\param Format A substitute string
|
||||||
\param Loc a locale used for case insensitive comparison
|
\param Loc A locale used for case insensitive comparison
|
||||||
\return An output iterator pointing just after last inserted character or
|
\return An output iterator pointing just after the last inserted character or
|
||||||
a modified copy of the input
|
a modified copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -241,14 +234,14 @@ namespace boost {
|
|||||||
|
|
||||||
//! Replace first algorithm ( case insensitive )
|
//! Replace first algorithm ( case insensitive )
|
||||||
/*!
|
/*!
|
||||||
Replace the first match of the search string in the input
|
Replace the first match of the search substring in the input
|
||||||
with the format string. Input sequence is modified in-place.
|
with the format string. Input sequence is modified in-place.
|
||||||
Searching is case insensitive.
|
Searching is case insensitive.
|
||||||
|
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for
|
\param Search A substring to be searched for
|
||||||
\param Format A substitute string
|
\param Format A substitute string
|
||||||
\param Loc a locale used for case insensitive comparison
|
\param Loc A locale used for case insensitive comparison
|
||||||
*/
|
*/
|
||||||
template<typename SequenceT, typename Collection1T, typename Collection2T>
|
template<typename SequenceT, typename Collection1T, typename Collection2T>
|
||||||
inline void ireplace_first(
|
inline void ireplace_first(
|
||||||
@ -270,18 +263,16 @@ namespace boost {
|
|||||||
Replace the last match of the search string in the input
|
Replace the last match of the search string in the input
|
||||||
with the format string.
|
with the format string.
|
||||||
The result is a modified copy of the input. It is returned as a sequence
|
The result is a modified copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator.
|
or copied to the output iterator.
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for
|
\param Search A substring to be searched for
|
||||||
\param Format A substitute string
|
\param Format A substitute string
|
||||||
\return An output iterator pointing just after last inserted character or
|
\return An output iterator pointing just after the last inserted character or
|
||||||
a modified copy of the input
|
a modified copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -323,7 +314,7 @@ namespace boost {
|
|||||||
with the format string. Input sequence is modified in-place.
|
with the format string. Input sequence is modified in-place.
|
||||||
|
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for
|
\param Search A substring to be searched for
|
||||||
\param Format A substitute string
|
\param Format A substitute string
|
||||||
*/
|
*/
|
||||||
template<typename SequenceT, typename Collection1T, typename Collection2T>
|
template<typename SequenceT, typename Collection1T, typename Collection2T>
|
||||||
@ -345,20 +336,18 @@ namespace boost {
|
|||||||
Replace the last match of the search string in the input
|
Replace the last match of the search string in the input
|
||||||
with the format string.
|
with the format string.
|
||||||
The result is a modified copy of the input. It is returned as a sequence
|
The result is a modified copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator.
|
or copied to the output iterator.
|
||||||
Searching is case insensitive.
|
Searching is case insensitive.
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for
|
\param Search A substring to be searched for
|
||||||
\param Format A substitute string
|
\param Format A substitute string
|
||||||
\param Loc a locale used for case insensitive comparison
|
\param Loc A locale used for case insensitive comparison
|
||||||
\return An output iterator pointing just after last inserted character or
|
\return An output iterator pointing just after the last inserted character or
|
||||||
a modified copy of the input
|
a modified copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -403,9 +392,9 @@ namespace boost {
|
|||||||
Searching is case insensitive.
|
Searching is case insensitive.
|
||||||
|
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for
|
\param Search A substring to be searched for
|
||||||
\param Format A substitute string
|
\param Format A substitute string
|
||||||
\param Loc a locale used for case insensitive comparison
|
\param Loc A locale used for case insensitive comparison
|
||||||
\return A reference to the modified input
|
\return A reference to the modified input
|
||||||
*/
|
*/
|
||||||
template<typename SequenceT, typename Collection1T, typename Collection2T>
|
template<typename SequenceT, typename Collection1T, typename Collection2T>
|
||||||
@ -428,19 +417,17 @@ namespace boost {
|
|||||||
Replace an Nth (zero-indexed) match of the search string in the input
|
Replace an Nth (zero-indexed) match of the search string in the input
|
||||||
with the format string.
|
with the format string.
|
||||||
The result is a modified copy of the input. It is returned as a sequence
|
The result is a modified copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator.
|
or copied to the output iterator.
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for
|
\param Search A substring to be searched for
|
||||||
\param Nth An index of the match to be replaced. The index is 0-based.
|
\param Nth An index of the match to be replaced. The index is 0-based.
|
||||||
\param Format A substitute string
|
\param Format A substitute string
|
||||||
\return An output iterator pointing just after last inserted character or
|
\return An output iterator pointing just after the last inserted character or
|
||||||
a modified copy of the input
|
a modified copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -484,7 +471,7 @@ namespace boost {
|
|||||||
with the format string. Input sequence is modified in-place.
|
with the format string. Input sequence is modified in-place.
|
||||||
|
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for
|
\param Search A substring to be searched for
|
||||||
\param Nth An index of the match to be replaced. The index is 0-based.
|
\param Nth An index of the match to be replaced. The index is 0-based.
|
||||||
\param Format A substitute string
|
\param Format A substitute string
|
||||||
*/
|
*/
|
||||||
@ -508,21 +495,19 @@ namespace boost {
|
|||||||
Replace an Nth (zero-indexed) match of the search string in the input
|
Replace an Nth (zero-indexed) match of the search string in the input
|
||||||
with the format string.
|
with the format string.
|
||||||
The result is a modified copy of the input. It is returned as a sequence
|
The result is a modified copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator.
|
or copied to the output iterator.
|
||||||
Searching is case insensitive.
|
Searching is case insensitive.
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for
|
\param Search A substring to be searched for
|
||||||
\param Nth An index of the match to be replaced. The index is 0-based.
|
\param Nth An index of the match to be replaced. The index is 0-based.
|
||||||
\param Format A substitute string
|
\param Format A substitute string
|
||||||
\param Loc a locale used for case insensitive comparison
|
\param Loc A locale used for case insensitive comparison
|
||||||
\return An output iterator pointing just after last inserted character or
|
\return An output iterator pointing just after the last inserted character or
|
||||||
a modified copy of the input
|
a modified copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -569,10 +554,10 @@ namespace boost {
|
|||||||
Searching is case insensitive.
|
Searching is case insensitive.
|
||||||
|
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for
|
\param Search A substring to be searched for
|
||||||
\param Nth An index of the match to be replaced. The index is 0-based.
|
\param Nth An index of the match to be replaced. The index is 0-based.
|
||||||
\param Format A substitute string
|
\param Format A substitute string
|
||||||
\param Loc a locale used for case insensitive comparison
|
\param Loc A locale used for case insensitive comparison
|
||||||
*/
|
*/
|
||||||
template<typename SequenceT, typename Collection1T, typename Collection2T>
|
template<typename SequenceT, typename Collection1T, typename Collection2T>
|
||||||
inline void ireplace_nth(
|
inline void ireplace_nth(
|
||||||
@ -595,18 +580,16 @@ namespace boost {
|
|||||||
Replace all occurrences of the search string in the input
|
Replace all occurrences of the search string in the input
|
||||||
with the format string.
|
with the format string.
|
||||||
The result is a modified copy of the input. It is returned as a sequence
|
The result is a modified copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator.
|
or copied to the output iterator.
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for
|
\param Search A substring to be searched for
|
||||||
\param Format A substitute string
|
\param Format A substitute string
|
||||||
\return An output iterator pointing just after last inserted character or
|
\return An output iterator pointing just after the last inserted character or
|
||||||
a modified copy of the input
|
a modified copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -648,7 +631,7 @@ namespace boost {
|
|||||||
with the format string. The input sequence is modified in-place.
|
with the format string. The input sequence is modified in-place.
|
||||||
|
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for
|
\param Search A substring to be searched for
|
||||||
\param Format A substitute string
|
\param Format A substitute string
|
||||||
\return A reference to the modified input
|
\return A reference to the modified input
|
||||||
*/
|
*/
|
||||||
@ -671,20 +654,18 @@ namespace boost {
|
|||||||
Replace all occurrences of the search string in the input
|
Replace all occurrences of the search string in the input
|
||||||
with the format string.
|
with the format string.
|
||||||
The result is a modified copy of the input. It is returned as a sequence
|
The result is a modified copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator.
|
or copied to the output iterator.
|
||||||
Searching is case insensitive.
|
Searching is case insensitive.
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for
|
\param Search A substring to be searched for
|
||||||
\param Format A substitute string
|
\param Format A substitute string
|
||||||
\param Loc a locale used for case insensitive comparison
|
\param Loc A locale used for case insensitive comparison
|
||||||
\return An output iterator pointing just after last inserted character or
|
\return An output iterator pointing just after the last inserted character or
|
||||||
a modified copy of the input
|
a modified copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -729,9 +710,9 @@ namespace boost {
|
|||||||
Searching is case insensitive.
|
Searching is case insensitive.
|
||||||
|
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param Search A string to be searched for
|
\param Search A substring to be searched for
|
||||||
\param Format A substitute string
|
\param Format A substitute string
|
||||||
\param Loc a locale used for case insensitive comparison
|
\param Loc A locale used for case insensitive comparison
|
||||||
*/
|
*/
|
||||||
template<typename SequenceT, typename Collection1T, typename Collection2T>
|
template<typename SequenceT, typename Collection1T, typename Collection2T>
|
||||||
inline void ireplace_all(
|
inline void ireplace_all(
|
||||||
@ -751,22 +732,20 @@ namespace boost {
|
|||||||
//! Replace head algorithm
|
//! Replace head algorithm
|
||||||
/*!
|
/*!
|
||||||
Replace the head of the input with the given format string.
|
Replace the head of the input with the given format string.
|
||||||
Head is a prefix of a string of given size.
|
The head is a prefix of a string of given size.
|
||||||
If the sequence is shorter then required, whole string if
|
If the sequence is shorter then required, whole string if
|
||||||
considered to be the head.
|
considered to be the head.
|
||||||
The result is a modified copy of the input. It is returned as a sequence
|
The result is a modified copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator.
|
or copied to the output iterator.
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param N A length of the head
|
\param N Length of the head
|
||||||
\param Format A substitute string
|
\param Format A substitute string
|
||||||
\return An output iterator pointing just after last inserted character or
|
\return An output iterator pointing just after the last inserted character or
|
||||||
a modified copy of the input
|
a modified copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -804,12 +783,12 @@ namespace boost {
|
|||||||
//! Replace head algorithm
|
//! Replace head algorithm
|
||||||
/*!
|
/*!
|
||||||
Replace the head of the input with the given format string.
|
Replace the head of the input with the given format string.
|
||||||
Head is a prefix of a string of given size.
|
The head is a prefix of a string of given size.
|
||||||
If the sequence is shorter then required, whole sequence if
|
If the sequence is shorter then required, the whole string is
|
||||||
considered to be the head. The input sequence is modified in-place.
|
considered to be the head. The input sequence is modified in-place.
|
||||||
|
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param N A length of the head
|
\param N Length of the head
|
||||||
\param Format A substitute string
|
\param Format A substitute string
|
||||||
*/
|
*/
|
||||||
template<typename SequenceT, typename CollectionT>
|
template<typename SequenceT, typename CollectionT>
|
||||||
@ -829,22 +808,20 @@ namespace boost {
|
|||||||
//! Replace tail algorithm
|
//! Replace tail algorithm
|
||||||
/*!
|
/*!
|
||||||
Replace the tail of the input with the given format string.
|
Replace the tail of the input with the given format string.
|
||||||
Tail is a suffix of a string of given size.
|
The tail is a suffix of a string of given size.
|
||||||
If the sequence is shorter then required, whole string if
|
If the sequence is shorter then required, whole string is
|
||||||
considered to be the tail.
|
considered to be the tail.
|
||||||
The result is a modified copy of the input. It is returned as a sequence
|
The result is a modified copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator.
|
or copied to the output iterator.
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param N A length of the head
|
\param N Length of the tail
|
||||||
\param Format A substitute string
|
\param Format A substitute string
|
||||||
\return An output iterator pointing just after last inserted character or
|
\return An output iterator pointing just after the last inserted character or
|
||||||
a modified copy of the input
|
a modified copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -882,12 +859,12 @@ namespace boost {
|
|||||||
//! Replace tail algorithm
|
//! Replace tail algorithm
|
||||||
/*!
|
/*!
|
||||||
Replace the tail of the input with the given format sequence.
|
Replace the tail of the input with the given format sequence.
|
||||||
Tail is a suffix of a string of given size.
|
The tail is a suffix of a string of given size.
|
||||||
If the sequence is shorter then required, whole string is
|
If the sequence is shorter then required, the whole string is
|
||||||
considered to be the tail. The input sequence is modified in-place.
|
considered to be the tail. The input sequence is modified in-place.
|
||||||
|
|
||||||
\param Input An input string
|
\param Input An input string
|
||||||
\param N A length of the head
|
\param N Length of the tail
|
||||||
\param Format A substitute string
|
\param Format A substitute string
|
||||||
*/
|
*/
|
||||||
template<typename SequenceT, typename CollectionT>
|
template<typename SequenceT, typename CollectionT>
|
||||||
|
@ -22,12 +22,12 @@
|
|||||||
For lacking compilers, it is possible of define an override for a specific tester
|
For lacking compilers, it is possible of define an override for a specific tester
|
||||||
function.
|
function.
|
||||||
|
|
||||||
Due to language restriction, it is not currently possible to define specialization for
|
Due to a language restriction, it is not currently possible to define specializations for
|
||||||
stl containers without including the corresponding header. To decrease the overhead
|
stl containers without including the corresponding header. To decrease the overhead
|
||||||
needed by this inclusion, user can selectively include specialization
|
needed by this inclusion, user can selectively include a specialization
|
||||||
header for a specific container. They are located in boost/algorithm/string/stl
|
header for a specific container. They are located in boost/algorithm/string/stl
|
||||||
directory. Alternatively she can include boost/algorithm/string/std_collection_traits.hpp
|
directory. Alternatively she can include boost/algorithm/string/std_collection_traits.hpp
|
||||||
header which contains specialization for all stl containers.
|
header which contains specializations for all stl containers.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
@ -107,7 +107,7 @@ namespace boost {
|
|||||||
|
|
||||||
//! Stable iterators trait
|
//! Stable iterators trait
|
||||||
/*!
|
/*!
|
||||||
This trait specifies that the sequence has stable iterators. It means,
|
This trait specifies that the sequence has stable iterators. It means
|
||||||
that operations like insert/erase/replace do not invalidate iterators.
|
that operations like insert/erase/replace do not invalidate iterators.
|
||||||
*/
|
*/
|
||||||
template< typename T >
|
template< typename T >
|
||||||
|
@ -20,13 +20,13 @@
|
|||||||
/*! \file
|
/*! \file
|
||||||
Defines basic split algorithms.
|
Defines basic split algorithms.
|
||||||
Split algorithms can be used to divide a string
|
Split algorithms can be used to divide a string
|
||||||
into several parts according to a given criteria.
|
into several parts according to given criteria.
|
||||||
|
|
||||||
Each part is copied and added as a new element to the
|
Each part is copied and added as a new element to the
|
||||||
output container.
|
output container.
|
||||||
Thus the result container must be able to hold copies
|
Thus the result container must be able to hold copies
|
||||||
of the matches (in a compatible structure like std::string) or
|
of the matches (in a compatible structure like std::string) or
|
||||||
a reference to it (f.e. using the iterator range class).
|
a reference to it (e.g. using the iterator range class).
|
||||||
Examples of such a container are \c std::vector<std::string>
|
Examples of such a container are \c std::vector<std::string>
|
||||||
or \c std::list<boost::iterator_range<std::string::iterator>>
|
or \c std::list<boost::iterator_range<std::string::iterator>>
|
||||||
*/
|
*/
|
||||||
@ -45,20 +45,18 @@ namespace boost {
|
|||||||
output container.
|
output container.
|
||||||
Thus the result container must be able to hold copies
|
Thus the result container must be able to hold copies
|
||||||
of the matches (in a compatible structure like std::string) or
|
of the matches (in a compatible structure like std::string) or
|
||||||
a reference to it (f.e. using the iterator range class).
|
a reference to it (e.g. using the iterator range class).
|
||||||
Examples of such a container are \c std::vector<std::string>
|
Examples of such a container are \c std::vector<std::string>
|
||||||
or \c std::list<boost::iterator_range<std::string::iterator>>
|
or \c std::list<boost::iterator_range<std::string::iterator>>
|
||||||
|
|
||||||
\param Result A container that can hold copies of references to the substrings
|
\param Result A container that can hold copies of references to the substrings
|
||||||
\param Input A container which will be searched.
|
\param Input A container which will be searched.
|
||||||
\param Search A string to be searched for.
|
\param Search A substring to be searched for.
|
||||||
\return A reference the result
|
\return A reference the result
|
||||||
|
|
||||||
\note Prior content of the result will be overridden.
|
\note Prior content of the result will be overwritten.
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note This function provides the strong exception-safety guarantee
|
||||||
about exception safety and result's container swap method have strong exception guarantee,
|
|
||||||
this function provides strong exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template< typename SequenceSequenceT, typename Collection1T, typename Collection2T >
|
template< typename SequenceSequenceT, typename Collection1T, typename Collection2T >
|
||||||
inline SequenceSequenceT& find_all(
|
inline SequenceSequenceT& find_all(
|
||||||
@ -74,12 +72,12 @@ namespace boost {
|
|||||||
|
|
||||||
//! Find all algorithm ( case insensitive )
|
//! Find all algorithm ( case insensitive )
|
||||||
/*!
|
/*!
|
||||||
This algorithm finds all occurrences of the search sequence
|
This algorithm finds all occurrences of the search string
|
||||||
in the input.
|
in the input.
|
||||||
Each part is copied and added as a new element to the
|
Each part is copied and added as a new element to the
|
||||||
output container. Thus the result container must be able to hold copies
|
output container. Thus the result container must be able to hold copies
|
||||||
of the matches (in a compatible structure like std::string) or
|
of the matches (in a compatible structure like std::string) or
|
||||||
a reference to it (f.e. using the iterator range class).
|
a reference to it (e.g. using the iterator range class).
|
||||||
Examples of such a container are \c std::vector<std::string>
|
Examples of such a container are \c std::vector<std::string>
|
||||||
or \c std::list<boost::iterator_range<std::string::iterator>>
|
or \c std::list<boost::iterator_range<std::string::iterator>>
|
||||||
|
|
||||||
@ -87,15 +85,13 @@ namespace boost {
|
|||||||
|
|
||||||
\param Result A container that can hold copies of references to the substrings
|
\param Result A container that can hold copies of references to the substrings
|
||||||
\param Input A container which will be searched.
|
\param Input A container which will be searched.
|
||||||
\param Search A string to be searched for.
|
\param Search A substring to be searched for.
|
||||||
\param Loc a locale used for case insensitive comparison
|
\param Loc A locale used for case insensitive comparison
|
||||||
\return A reference the result
|
\return A reference the result
|
||||||
|
|
||||||
\note Prior content of the result will be overridden.
|
\note Prior content of the result will be overwritten.
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note This function provides the strong exception-safety guarantee
|
||||||
about exception safety and result's container swap method have strong exception guarantee,
|
|
||||||
this function provides strong exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template< typename SequenceSequenceT, typename Collection1T, typename Collection2T >
|
template< typename SequenceSequenceT, typename Collection1T, typename Collection2T >
|
||||||
inline SequenceSequenceT& ifind_all(
|
inline SequenceSequenceT& ifind_all(
|
||||||
@ -115,15 +111,15 @@ namespace boost {
|
|||||||
|
|
||||||
//! Split algorithm
|
//! Split algorithm
|
||||||
/*!
|
/*!
|
||||||
Tokenize expression. This function is equivalent of C strtok. Input
|
Tokenize expression. This function is equivalent to C strtok. Input
|
||||||
sequence is split into tokens, separated by separators. Separators
|
sequence is split into tokens, separated by separators. Separators
|
||||||
are given in the mean of predicate.
|
are given by means of the predicate.
|
||||||
|
|
||||||
Each part is copied and added as a new element to the
|
Each part is copied and added as a new element to the
|
||||||
output container.
|
output container.
|
||||||
Thus the result container must be able to hold copies
|
Thus the result container must be able to hold copies
|
||||||
of the matches (in a compatible structure like std::string) or
|
of the matches (in a compatible structure like std::string) or
|
||||||
a reference to it (f.e. using the iterator range class).
|
a reference to it (e.g. using the iterator range class).
|
||||||
Examples of such a container are \c std::vector<std::string>
|
Examples of such a container are \c std::vector<std::string>
|
||||||
or \c std::list<boost::iterator_range<std::string::iterator>>
|
or \c std::list<boost::iterator_range<std::string::iterator>>
|
||||||
|
|
||||||
@ -136,11 +132,9 @@ namespace boost {
|
|||||||
delimit a token.
|
delimit a token.
|
||||||
\return A reference the result
|
\return A reference the result
|
||||||
|
|
||||||
\note Prior content of the result will be overridden.
|
\note Prior content of the result will be overwritten.
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note This function provides the strong exception-safety guarantee
|
||||||
about exception safety and result's container swap() method have strong exception guarantee,
|
|
||||||
this function provides strong exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template< typename SequenceSequenceT, typename CollectionT, typename PredicateT >
|
template< typename SequenceSequenceT, typename CollectionT, typename PredicateT >
|
||||||
inline SequenceSequenceT& split(
|
inline SequenceSequenceT& split(
|
||||||
|
@ -21,10 +21,10 @@
|
|||||||
Trim algorithms are used to remove trailing and leading spaces from a
|
Trim algorithms are used to remove trailing and leading spaces from a
|
||||||
sequence (string). Space is recognized using given locales.
|
sequence (string). Space is recognized using given locales.
|
||||||
|
|
||||||
Parametric (\c _if) variants use predicate (functor) to select which characters
|
Parametric (\c _if) variants use a predicate (functor) to select which characters
|
||||||
are to be trimmed..
|
are to be trimmed..
|
||||||
Functions take a selection predicate as a parameter, which is used to determine
|
Functions take a selection predicate as a parameter, which is used to determine
|
||||||
if a character is a space. Common predicates are provided in classification.hpp header.
|
whether a character is a space. Common predicates are provided in classification.hpp header.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -36,21 +36,19 @@ namespace boost {
|
|||||||
|
|
||||||
//! Left trim - parametric
|
//! Left trim - parametric
|
||||||
/*!
|
/*!
|
||||||
Remove all leading spaces from the input. Supplied predicate
|
Remove all leading spaces from the input.
|
||||||
is used to determine which character is a space.
|
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
|
The result is a trimmed copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator
|
or copied to the output iterator
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input collection
|
\param Input An input collection
|
||||||
\param IsSpace An unary predicate identifying spaces
|
\param IsSpace An unary predicate identifying spaces
|
||||||
\return
|
\return
|
||||||
An output iterator pointing just after last inserted character or
|
An output iterator pointing just after the last inserted character or
|
||||||
a copy of the input
|
a copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, the second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<typename OutputIteratorT, typename CollectionT, typename PredicateT>
|
template<typename OutputIteratorT, typename CollectionT, typename PredicateT>
|
||||||
inline OutputIteratorT trim_left_copy_if(
|
inline OutputIteratorT trim_left_copy_if(
|
||||||
@ -93,9 +91,7 @@ namespace boost {
|
|||||||
\param Loc a locale used for 'space' classification
|
\param Loc a locale used for 'space' classification
|
||||||
\return A trimmed copy of the input
|
\return A trimmed copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note This function provides the strong exception-safety guarantee
|
||||||
about exception safety, this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<typename SequenceT>
|
template<typename SequenceT>
|
||||||
inline SequenceT trim_left_copy(const SequenceT& Input, const std::locale& Loc=std::locale())
|
inline SequenceT trim_left_copy(const SequenceT& Input, const std::locale& Loc=std::locale())
|
||||||
@ -108,8 +104,8 @@ namespace boost {
|
|||||||
|
|
||||||
//! Left trim
|
//! Left trim
|
||||||
/*!
|
/*!
|
||||||
Remove all leading spaces from the input. Supplied predicate
|
Remove all leading spaces from the input. The supplied predicate is
|
||||||
is used to determine which character is a space.
|
used to determine which characters are considered spaces.
|
||||||
The input sequence is modified in-place.
|
The input sequence is modified in-place.
|
||||||
|
|
||||||
\param Input An input sequence
|
\param Input An input sequence
|
||||||
@ -146,21 +142,19 @@ namespace boost {
|
|||||||
|
|
||||||
//! Right trim - parametric
|
//! Right trim - parametric
|
||||||
/*!
|
/*!
|
||||||
Remove all trailing spaces from the input. Supplied predicate
|
Remove all trailing spaces from the input.
|
||||||
is used to determine which character is a space.
|
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
|
The result is a trimmed copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator
|
or copied to the output iterator
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input collection
|
\param Input An input collection
|
||||||
\param IsSpace An unary predicate identifying spaces
|
\param IsSpace An unary predicate identifying spaces
|
||||||
\return
|
\return
|
||||||
An output iterator pointing just after last inserted character or
|
An output iterator pointing just after the last inserted character or
|
||||||
a copy of the input
|
a copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, the second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<typename OutputIteratorT, typename CollectionT, typename PredicateT>
|
template<typename OutputIteratorT, typename CollectionT, typename PredicateT>
|
||||||
inline OutputIteratorT trim_right_copy_if(
|
inline OutputIteratorT trim_right_copy_if(
|
||||||
@ -204,10 +198,8 @@ namespace boost {
|
|||||||
\param Loc A locale used for 'space' classification
|
\param Loc A locale used for 'space' classification
|
||||||
\return A trimmed copy of the input
|
\return A trimmed copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy second assumption
|
\note This function provides the strong exception-safety guarantee
|
||||||
about exception safety, this function provides strong
|
*/
|
||||||
exception guarantee.
|
|
||||||
*/
|
|
||||||
template<typename SequenceT>
|
template<typename SequenceT>
|
||||||
inline SequenceT trim_right_copy(const SequenceT& Input, const std::locale& Loc=std::locale())
|
inline SequenceT trim_right_copy(const SequenceT& Input, const std::locale& Loc=std::locale())
|
||||||
{
|
{
|
||||||
@ -220,8 +212,8 @@ namespace boost {
|
|||||||
|
|
||||||
//! Right trim - parametric
|
//! Right trim - parametric
|
||||||
/*!
|
/*!
|
||||||
Remove all trailing spaces from the input. Supplied predicate
|
Remove all trailing spaces from the input.
|
||||||
is used to determine which character is a space.
|
The supplied predicate is used to determine which characters are considered spaces.
|
||||||
The input sequence is modified in-place.
|
The input sequence is modified in-place.
|
||||||
|
|
||||||
\param Input An input sequence
|
\param Input An input sequence
|
||||||
@ -261,20 +253,18 @@ namespace boost {
|
|||||||
//! Trim - parametric
|
//! Trim - parametric
|
||||||
/*!
|
/*!
|
||||||
Remove all trailing and leading spaces from the input.
|
Remove all trailing and leading spaces from the input.
|
||||||
Supplied predicate is used to determine which character is a space.
|
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
|
The result is a trimmed copy of the input. It is returned as a sequence
|
||||||
or copied to an output iterator
|
or copied to the output iterator
|
||||||
|
|
||||||
\param Output A output iterator to which the result will be copied
|
\param Output An output iterator to which the result will be copied
|
||||||
\param Input An input collection
|
\param Input An input collection
|
||||||
\param IsSpace An unary predicate identifying spaces
|
\param IsSpace An unary predicate identifying spaces
|
||||||
\return
|
\return
|
||||||
An output iterator pointing just after last inserted character or
|
An output iterator pointing just after the last inserted character or
|
||||||
a copy of the input
|
a copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
about exception safety, the second variant of this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<typename OutputIteratorT, typename CollectionT, typename PredicateT>
|
template<typename OutputIteratorT, typename CollectionT, typename PredicateT>
|
||||||
inline OutputIteratorT trim_copy_if(
|
inline OutputIteratorT trim_copy_if(
|
||||||
@ -331,9 +321,7 @@ namespace boost {
|
|||||||
\param Loc A locale used for 'space' classification
|
\param Loc A locale used for 'space' classification
|
||||||
\return A trimmed copy of the input
|
\return A trimmed copy of the input
|
||||||
|
|
||||||
\note If the input parameters satisfy the second assumption
|
\note This function provides the strong exception-safety guarantee
|
||||||
about exception safety, this function provides strong
|
|
||||||
exception guarantee.
|
|
||||||
*/
|
*/
|
||||||
template<typename SequenceT>
|
template<typename SequenceT>
|
||||||
inline SequenceT trim_copy( const SequenceT& Input, const std::locale& Loc=std::locale() )
|
inline SequenceT trim_copy( const SequenceT& Input, const std::locale& Loc=std::locale() )
|
||||||
@ -347,7 +335,7 @@ namespace boost {
|
|||||||
//! Trim
|
//! Trim
|
||||||
/*!
|
/*!
|
||||||
Remove all leading and trailing spaces from the input.
|
Remove all leading and trailing spaces from the input.
|
||||||
Supplied predicate is used to determine which character is a space.
|
The supplied predicate is used to determine which characters are considered spaces.
|
||||||
The input sequence is modified in-place.
|
The input sequence is modified in-place.
|
||||||
|
|
||||||
\param Input An input sequence
|
\param Input An input sequence
|
||||||
|
Reference in New Issue
Block a user