mirror of
https://github.com/boostorg/algorithm.git
synced 2025-07-30 04:27:16 +02:00
Tabs removed
[SVN r23617]
This commit is contained in:
@ -115,7 +115,7 @@ namespace boost {
|
|||||||
An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<typename OutputIteratorT, typename CollectionT>
|
template<typename OutputIteratorT, typename CollectionT>
|
||||||
inline OutputIteratorT
|
inline OutputIteratorT
|
||||||
|
@ -38,8 +38,8 @@ namespace boost {
|
|||||||
\return An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety 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,
|
||||||
@ -107,7 +107,7 @@ namespace boost {
|
|||||||
\return An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -175,8 +175,8 @@ namespace boost {
|
|||||||
\return An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
typename Collection1T,
|
typename Collection1T,
|
||||||
@ -245,7 +245,7 @@ namespace boost {
|
|||||||
\return An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -313,7 +313,7 @@ namespace boost {
|
|||||||
\return An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -385,7 +385,7 @@ namespace boost {
|
|||||||
\return An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -458,7 +458,7 @@ namespace boost {
|
|||||||
\return An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -534,7 +534,7 @@ namespace boost {
|
|||||||
\return An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -602,7 +602,7 @@ namespace boost {
|
|||||||
\return An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -674,7 +674,7 @@ namespace boost {
|
|||||||
\return An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -742,7 +742,7 @@ namespace boost {
|
|||||||
\return An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
|
@ -64,7 +64,7 @@ namespace boost {
|
|||||||
\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 This function provides the strong exception-safety guarantee
|
\note This function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<typename Collection1T, typename Collection2T>
|
template<typename Collection1T, typename Collection2T>
|
||||||
inline iterator_range<
|
inline iterator_range<
|
||||||
@ -91,7 +91,7 @@ namespace boost {
|
|||||||
\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 This function provides the strong exception-safety guarantee
|
\note This function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<typename Collection1T, typename Collection2T>
|
template<typename Collection1T, typename Collection2T>
|
||||||
inline iterator_range<
|
inline iterator_range<
|
||||||
@ -119,7 +119,7 @@ namespace boost {
|
|||||||
\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 This function provides the strong exception-safety guarantee
|
\note This function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<typename Collection1T, typename Collection2T>
|
template<typename Collection1T, typename Collection2T>
|
||||||
inline iterator_range<
|
inline iterator_range<
|
||||||
@ -146,8 +146,8 @@ namespace boost {
|
|||||||
\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 This function provides the strong exception-safety guarantee
|
\note This function provides the strong exception-safety 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>
|
||||||
@ -204,7 +204,7 @@ namespace boost {
|
|||||||
the input parameter.
|
the input parameter.
|
||||||
|
|
||||||
|
|
||||||
\note This function provides the strong exception-safety guarantee
|
\note This function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<typename Collection1T, typename Collection2T>
|
template<typename Collection1T, typename Collection2T>
|
||||||
inline iterator_range<
|
inline iterator_range<
|
||||||
@ -235,7 +235,7 @@ namespace boost {
|
|||||||
\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 This function provides the strong exception-safety guarantee
|
\note This function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<typename CollectionT>
|
template<typename CollectionT>
|
||||||
inline iterator_range<
|
inline iterator_range<
|
||||||
@ -265,8 +265,8 @@ namespace boost {
|
|||||||
the input parameter.
|
the input parameter.
|
||||||
|
|
||||||
|
|
||||||
\note This function provides the strong exception-safety guarantee
|
\note This function provides the strong exception-safety 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>
|
||||||
@ -295,8 +295,8 @@ namespace boost {
|
|||||||
\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 This function provides the strong exception-safety guarantee
|
\note This function provides the strong exception-safety 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>
|
||||||
|
@ -43,7 +43,7 @@ namespace boost {
|
|||||||
\return An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -154,7 +154,7 @@ namespace boost {
|
|||||||
\return An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
|
@ -44,8 +44,8 @@ namespace boost {
|
|||||||
\param Comp An element comparison predicate
|
\param Comp An element comparison predicate
|
||||||
\return The result of the test
|
\return The result of the test
|
||||||
|
|
||||||
\note This function provides the strong exception-safety guarantee
|
\note This function provides the strong exception-safety 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,
|
||||||
@ -96,7 +96,7 @@ namespace boost {
|
|||||||
\param Loc A locale used for case insensitive comparison
|
\param Loc A locale used for case insensitive comparison
|
||||||
\return The result of the test
|
\return The result of the test
|
||||||
|
|
||||||
\note This function provides the strong exception-safety guarantee
|
\note This function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<typename Collection1T, typename Collection2T>
|
template<typename Collection1T, typename Collection2T>
|
||||||
inline bool istarts_with(
|
inline bool istarts_with(
|
||||||
@ -123,7 +123,7 @@ namespace boost {
|
|||||||
\param Comp An element comparison predicate
|
\param Comp An element comparison predicate
|
||||||
\return The result of the test
|
\return The result of the test
|
||||||
|
|
||||||
\note This function provides the strong exception-safety guarantee
|
\note This function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<typename Collection1T, typename Collection2T, typename PredicateT>
|
template<typename Collection1T, typename Collection2T, typename PredicateT>
|
||||||
inline bool ends_with(
|
inline bool ends_with(
|
||||||
@ -170,7 +170,7 @@ namespace boost {
|
|||||||
\param Loc A locale used for case insensitive comparison
|
\param Loc A locale used for case insensitive comparison
|
||||||
\return The result of the test
|
\return The result of the test
|
||||||
|
|
||||||
\note This function provides the strong exception-safety guarantee
|
\note This function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<typename Collection1T, typename Collection2T>
|
template<typename Collection1T, typename Collection2T>
|
||||||
inline bool iends_with(
|
inline bool iends_with(
|
||||||
@ -194,7 +194,7 @@ namespace boost {
|
|||||||
\param Comp An element comparison predicate
|
\param Comp An element comparison predicate
|
||||||
\return The result of the test
|
\return The result of the test
|
||||||
|
|
||||||
\note This function provides the strong exception-safety guarantee
|
\note This function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<typename Collection1T, typename Collection2T, typename PredicateT>
|
template<typename Collection1T, typename Collection2T, typename PredicateT>
|
||||||
inline bool contains(
|
inline bool contains(
|
||||||
@ -233,7 +233,7 @@ namespace boost {
|
|||||||
\param Loc A locale used for case insensitive comparison
|
\param Loc A locale used for case insensitive comparison
|
||||||
\return The result of the test
|
\return The result of the test
|
||||||
|
|
||||||
\note This function provides the strong exception-safety guarantee
|
\note This function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<typename Collection1T, typename Collection2T>
|
template<typename Collection1T, typename Collection2T>
|
||||||
inline bool icontains(
|
inline bool icontains(
|
||||||
|
@ -41,7 +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 This function provides the strong exception-safety guarantee
|
\note This function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename CollectionT,
|
typename CollectionT,
|
||||||
@ -75,7 +75,7 @@ namespace boost {
|
|||||||
\return An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -161,7 +161,7 @@ namespace boost {
|
|||||||
\return An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -246,7 +246,7 @@ namespace boost {
|
|||||||
\return An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -325,7 +325,7 @@ namespace boost {
|
|||||||
\return An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -410,8 +410,8 @@ namespace boost {
|
|||||||
|
|
||||||
\note Prior content of the result will be overwritten.
|
\note Prior content of the result will be overwritten.
|
||||||
|
|
||||||
\note This function provides the strong exception-safety guarantee
|
\note This function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename SequenceSequenceT,
|
typename SequenceSequenceT,
|
||||||
typename CollectionT,
|
typename CollectionT,
|
||||||
@ -451,7 +451,7 @@ namespace boost {
|
|||||||
|
|
||||||
\note Prior content of the result will be overwritten.
|
\note Prior content of the result will be overwritten.
|
||||||
|
|
||||||
\note This function provides the strong exception-safety guarantee
|
\note This function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename SequenceSequenceT,
|
typename SequenceSequenceT,
|
||||||
|
@ -41,7 +41,7 @@ namespace boost {
|
|||||||
\return An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -119,7 +119,7 @@ namespace boost {
|
|||||||
\return An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -194,7 +194,7 @@ namespace boost {
|
|||||||
\return An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -272,7 +272,7 @@ namespace boost {
|
|||||||
\return An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -347,7 +347,7 @@ namespace boost {
|
|||||||
\return An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -427,7 +427,7 @@ namespace boost {
|
|||||||
\return An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -507,7 +507,7 @@ namespace boost {
|
|||||||
\return An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -589,7 +589,7 @@ namespace boost {
|
|||||||
\return An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -665,7 +665,7 @@ namespace boost {
|
|||||||
\return An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -745,7 +745,7 @@ namespace boost {
|
|||||||
\return An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
@ -821,7 +821,7 @@ namespace boost {
|
|||||||
\return An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
typename OutputIteratorT,
|
typename OutputIteratorT,
|
||||||
|
@ -56,7 +56,7 @@ namespace boost {
|
|||||||
|
|
||||||
\note Prior content of the result will be overwritten.
|
\note Prior content of the result will be overwritten.
|
||||||
|
|
||||||
\note This function provides the strong exception-safety guarantee
|
\note This function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template< typename SequenceSequenceT, typename Collection1T, typename Collection2T >
|
template< typename SequenceSequenceT, typename Collection1T, typename Collection2T >
|
||||||
inline SequenceSequenceT& find_all(
|
inline SequenceSequenceT& find_all(
|
||||||
@ -91,7 +91,7 @@ namespace boost {
|
|||||||
|
|
||||||
\note Prior content of the result will be overwritten.
|
\note Prior content of the result will be overwritten.
|
||||||
|
|
||||||
\note This function provides the strong exception-safety guarantee
|
\note This function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template< typename SequenceSequenceT, typename Collection1T, typename Collection2T >
|
template< typename SequenceSequenceT, typename Collection1T, typename Collection2T >
|
||||||
inline SequenceSequenceT& ifind_all(
|
inline SequenceSequenceT& ifind_all(
|
||||||
@ -134,7 +134,7 @@ namespace boost {
|
|||||||
|
|
||||||
\note Prior content of the result will be overwritten.
|
\note Prior content of the result will be overwritten.
|
||||||
|
|
||||||
\note This function provides the strong exception-safety guarantee
|
\note This function provides the strong exception-safety guarantee
|
||||||
*/
|
*/
|
||||||
template< typename SequenceSequenceT, typename CollectionT, typename PredicateT >
|
template< typename SequenceSequenceT, typename CollectionT, typename PredicateT >
|
||||||
inline SequenceSequenceT& split(
|
inline SequenceSequenceT& split(
|
||||||
|
@ -37,7 +37,7 @@ namespace boost {
|
|||||||
//! Left trim - parametric
|
//! Left trim - parametric
|
||||||
/*!
|
/*!
|
||||||
Remove all leading spaces from the input.
|
Remove all leading spaces from the input.
|
||||||
The supplied predicate is used to determine which characters are considered spaces.
|
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 the output iterator
|
or copied to the output iterator
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ namespace boost {
|
|||||||
An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety 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(
|
||||||
@ -91,7 +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 This function provides the strong exception-safety guarantee
|
\note This function provides the strong exception-safety 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())
|
||||||
@ -104,8 +104,8 @@ namespace boost {
|
|||||||
|
|
||||||
//! Left trim
|
//! Left trim
|
||||||
/*!
|
/*!
|
||||||
Remove all leading spaces from the input. The supplied predicate is
|
Remove all leading spaces from the input. The supplied predicate is
|
||||||
used to determine which characters are considered spaces.
|
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
|
||||||
@ -143,7 +143,7 @@ namespace boost {
|
|||||||
//! Right trim - parametric
|
//! Right trim - parametric
|
||||||
/*!
|
/*!
|
||||||
Remove all trailing spaces from the input.
|
Remove all trailing spaces from the input.
|
||||||
The supplied predicate is used to determine which characters are considered spaces.
|
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 the output iterator
|
or copied to the output iterator
|
||||||
|
|
||||||
@ -154,7 +154,7 @@ namespace boost {
|
|||||||
An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety 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(
|
||||||
@ -198,8 +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 This function provides the strong exception-safety guarantee
|
\note This function provides the strong exception-safety 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())
|
||||||
{
|
{
|
||||||
@ -212,8 +212,8 @@ namespace boost {
|
|||||||
|
|
||||||
//! Right trim - parametric
|
//! Right trim - parametric
|
||||||
/*!
|
/*!
|
||||||
Remove all trailing spaces from the input.
|
Remove all trailing spaces from the input.
|
||||||
The supplied predicate is used to determine which characters are considered spaces.
|
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
|
||||||
@ -253,7 +253,7 @@ namespace boost {
|
|||||||
//! Trim - parametric
|
//! Trim - parametric
|
||||||
/*!
|
/*!
|
||||||
Remove all trailing and leading spaces from the input.
|
Remove all trailing and leading spaces from the input.
|
||||||
The supplied predicate is used to determine which characters are considered spaces.
|
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 the output iterator
|
or copied to the output iterator
|
||||||
|
|
||||||
@ -264,7 +264,7 @@ namespace boost {
|
|||||||
An output iterator pointing just after the 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 The second variant of this function provides the strong exception-safety guarantee
|
\note The second variant of this function provides the strong exception-safety 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(
|
||||||
@ -321,7 +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 This function provides the strong exception-safety guarantee
|
\note This function provides the strong exception-safety 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() )
|
||||||
@ -335,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.
|
||||||
The supplied predicate is used to determine which characters are considered spaces.
|
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
|
||||||
|
@ -75,7 +75,7 @@
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Various algorithms need to perform a search in a container and a Finder is a generalization of such
|
Various algorithms need to perform a search in a container and a Finder is a generalization of such
|
||||||
search operations that allows algorithms to abstract from searching. For instance, generic replace
|
search operations that allows algorithms to abstract from searching. For instance, generic replace
|
||||||
algorithms can replace any part of the input, and the Finder is used to select the desired one.
|
algorithms can replace any part of the input, and the Finder is used to select the desired one.
|
||||||
</para>
|
</para>
|
||||||
@ -106,7 +106,7 @@ struct simple_finder
|
|||||||
</programlisting>
|
</programlisting>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
Function Finder. Finder can be any function object. That is, any ordinary function with the
|
Function Finder. Finder can be any function object. That is, any ordinary function with the
|
||||||
required signature can be used as well. However, such a function can be used only for
|
required signature can be used as well. However, such a function can be used only for
|
||||||
a specific iterator type.
|
a specific iterator type.
|
||||||
|
|
||||||
@ -165,8 +165,8 @@ boost::iterator_range<std::string> simple_finder(
|
|||||||
<para>
|
<para>
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
Formatter implemented as a class. This Formatter does not perform any formating and
|
Formatter implemented as a class. This Formatter does not perform any formating and
|
||||||
returns the match, repackaged. <code>operator()</code>
|
returns the match, repackaged. <code>operator()</code>
|
||||||
is templated, so that the Formatter can be used on any Finder type.
|
is templated, so that the Formatter can be used on any Finder type.
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
<section id="string_algo.ack">
|
<section id="string_algo.ack">
|
||||||
<title>Acknowledgments</title>
|
<title>Acknowledgments</title>
|
||||||
<para>
|
<para>
|
||||||
The author would like to thank everybody who gave suggestions and comments. Especially valuable
|
The author would like to thank everybody who gave suggestions and comments. Especially valuable
|
||||||
were the contributions of Thorsten Ottosen, Jeff Garland and the other boost members who participated
|
were the contributions of Thorsten Ottosen, Jeff Garland and the other boost members who participated
|
||||||
in the review process, namely David Abrahams, Daniel Frey, Beman Dawes, John Maddock, David B.Held, Pavel Vozenilek
|
in the review process, namely David Abrahams, Daniel Frey, Beman Dawes, John Maddock, David B.Held, Pavel Vozenilek
|
||||||
and many other.
|
and many other.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
In the reference and also in the code, requirement on the string type is designated by the name of
|
In the reference and also in the code, requirement on the string type is designated by the name of
|
||||||
template argument. <code>CollectionT</code> means that the basic collection requirements must hold.
|
template argument. <code>CollectionT</code> means that the basic collection requirements must hold.
|
||||||
<code>SequenceT</code> designates extended sequence requirements.
|
<code>SequenceT</code> designates extended sequence requirements.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
@ -61,13 +61,13 @@
|
|||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
It is possible to encapsulate a range in <code>std::pair<></code>, but
|
It is possible to encapsulate a range in <code>std::pair<></code>, but
|
||||||
<code>std::pair<></code> is an overly generic encapsulation, so it is not best match for a range.
|
<code>std::pair<></code> is an overly generic encapsulation, so it is not best match for a range.
|
||||||
For instance, it does not enforce that begin and end iterators be of the same type.
|
For instance, it does not enforce that begin and end iterators be of the same type.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Naturally the range concept is heavily used also in this library. During the development of
|
Naturally the range concept is heavily used also in this library. During the development of
|
||||||
the library, it was discovered, that there is a need for a reasonable encapsulation for it, since
|
the library, it was discovered, that there is a need for a reasonable encapsulation for it, since
|
||||||
core part of the library deals with substring searching algorithms and any such algorithm
|
core part of the library deals with substring searching algorithms and any such algorithm
|
||||||
returns a range delimiting the result of the search. <code>std::pair<></code> was deemed as
|
returns a range delimiting the result of the search. <code>std::pair<></code> was deemed as
|
||||||
unsuitable. Therefore the <code>iterator_range</code> was defined.
|
unsuitable. Therefore the <code>iterator_range</code> was defined.
|
||||||
</para>
|
</para>
|
||||||
@ -76,7 +76,7 @@
|
|||||||
a basic interface for common operations. Its interface is similar to that of a collection.
|
a basic interface for common operations. Its interface is similar to that of a collection.
|
||||||
In addition to <code>begin()</code>
|
In addition to <code>begin()</code>
|
||||||
and <code>end()</code> accessors, it has member functions for checking whether the range is empty,
|
and <code>end()</code> accessors, it has member functions for checking whether the range is empty,
|
||||||
or to determine the size of the range. It also has a set of member typedefs that extract
|
or to determine the size of the range. It also has a set of member typedefs that extract
|
||||||
type information from the encapsulated iterators. As such, the interface is compatible with
|
type information from the encapsulated iterators. As such, the interface is compatible with
|
||||||
the <link linkend="string_algo.collection_traits">collection traits</link> requirements so
|
the <link linkend="string_algo.collection_traits">collection traits</link> requirements so
|
||||||
it is possible to use this class as a parameter to many algorithms in this library.
|
it is possible to use this class as a parameter to many algorithms in this library.
|
||||||
@ -206,15 +206,15 @@
|
|||||||
<title>Sequence Traits</title>
|
<title>Sequence Traits</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The major difference between <code>std::list</code> and <code>std::vector</code> is not in the interfaces
|
The major difference between <code>std::list</code> and <code>std::vector</code> is not in the interfaces
|
||||||
they provide, but rather in the inner details of the class and the way how it performs
|
they provide, but rather in the inner details of the class and the way how it performs
|
||||||
various operations. The problem is that it is not possible to infer this difference from the
|
various operations. The problem is that it is not possible to infer this difference from the
|
||||||
definitions of classes without some special mechanism.
|
definitions of classes without some special mechanism.
|
||||||
However, some algorithms can run significantly faster with the knowledge of the properties
|
However, some algorithms can run significantly faster with the knowledge of the properties
|
||||||
of a particular container.
|
of a particular container.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Sequence traits allow one to specify additional properties of a sequence container (see Std.§32.2).
|
Sequence traits allow one to specify additional properties of a sequence container (see Std.§32.2).
|
||||||
These properties are then used by algorithms to select optimized handling for some operations.
|
These properties are then used by algorithms to select optimized handling for some operations.
|
||||||
The sequence traits are declared in the header
|
The sequence traits are declared in the header
|
||||||
<headername>boost/algorithm/string/sequence_traits.hpp</headername>.
|
<headername>boost/algorithm/string/sequence_traits.hpp</headername>.
|
||||||
@ -311,7 +311,7 @@
|
|||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
As usual, the implementation of the lower layer is designed to work with a generic sequence while
|
As usual, the implementation of the lower layer is designed to work with a generic sequence while
|
||||||
taking advantage of specific features if possible
|
taking advantage of specific features if possible
|
||||||
(by using <link linkend="string_algo.sequence_traits">Sequence traits</link>)
|
(by using <link linkend="string_algo.sequence_traits">Sequence traits</link>)
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
@ -322,7 +322,7 @@
|
|||||||
Find iterators are a logical extension of the <link linkend="string_algo.find">find facility</link>.
|
Find iterators are a logical extension of the <link linkend="string_algo.find">find facility</link>.
|
||||||
Instead of searching for one match, the whole input can be iteratively searched for multiple matches.
|
Instead of searching for one match, the whole input can be iteratively searched for multiple matches.
|
||||||
The result of the search is then used to partition the input. It depends on the algorithms which parts
|
The result of the search is then used to partition the input. It depends on the algorithms which parts
|
||||||
are returned as the result. They can be the matching parts (<classname>find_iterator</classname>) of the parts in
|
are returned as the result. They can be the matching parts (<classname>find_iterator</classname>) of the parts in
|
||||||
between (<classname>split_iterator</classname>).
|
between (<classname>split_iterator</classname>).
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
@ -334,40 +334,40 @@
|
|||||||
<section id="string_algo.exception">
|
<section id="string_algo.exception">
|
||||||
<title>Exception Safety</title>
|
<title>Exception Safety</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The library requires that all operations on types used as template
|
The library requires that all operations on types used as template
|
||||||
or function arguments provide the <emphasis>basic exception-safety guarantee</emphasis>.
|
or function arguments provide the <emphasis>basic exception-safety guarantee</emphasis>.
|
||||||
In turn, all functions and algorithms in this library, except where stated
|
In turn, all functions and algorithms in this library, except where stated
|
||||||
otherwise, will provide the <emphasis>basic exception-safety guarantee</emphasis>.
|
otherwise, will provide the <emphasis>basic exception-safety guarantee</emphasis>.
|
||||||
In other words:
|
In other words:
|
||||||
The library maintains its invariants and does not leak resources in
|
The library maintains its invariants and does not leak resources in
|
||||||
the face of exceptions. Some library operations give stronger
|
the face of exceptions. Some library operations give stronger
|
||||||
guarantees, which are documented on an individual basis.
|
guarantees, which are documented on an individual basis.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Some functions can provide the <emphasis>strong exception-safety guarantee</emphasis>.
|
Some functions can provide the <emphasis>strong exception-safety guarantee</emphasis>.
|
||||||
That means that following statements are true:
|
That means that following statements are true:
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
If an exception is thrown, there are no effects other than those
|
If an exception is thrown, there are no effects other than those
|
||||||
of the function
|
of the function
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
If an exception is thrown other than by the function, there are no effects
|
If an exception is thrown other than by the function, there are no effects
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
This guarantee can be provided under the condition that the operations
|
This guarantee can be provided under the condition that the operations
|
||||||
on the types used for arguments for these functions either
|
on the types used for arguments for these functions either
|
||||||
provide the strong exception guarantee or do not alter the global state .
|
provide the strong exception guarantee or do not alter the global state .
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
In the reference, under the term <emphasis>strong exception-safety guarantee</emphasis>, we mean the
|
In the reference, under the term <emphasis>strong exception-safety guarantee</emphasis>, we mean the
|
||||||
guarantee as defined above.
|
guarantee as defined above.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
For more information about the exception safety topics, follow this
|
For more information about the exception safety topics, follow this
|
||||||
<ulink url="../../more/generic_exception_safety.html">link</ulink>
|
<ulink url="../../more/generic_exception_safety.html">link</ulink>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
@ -200,7 +200,7 @@
|
|||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>find_tail</entry>
|
<entry>find_tail</entry>
|
||||||
<entry>Retrieve the tail of a string</entry>
|
<entry>Retrieve the tail of a string</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<functionname>find_tail()</functionname>
|
<functionname>find_tail()</functionname>
|
||||||
</entry>
|
</entry>
|
||||||
@ -340,7 +340,7 @@
|
|||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>replace/erase_tail</entry>
|
<entry>replace/erase_tail</entry>
|
||||||
<entry>Replace/Erase the tail of the input</entry>
|
<entry>Replace/Erase the tail of the input</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<functionname>replace_tail()</functionname>
|
<functionname>replace_tail()</functionname>
|
||||||
<sbr/>
|
<sbr/>
|
||||||
@ -650,7 +650,7 @@
|
|||||||
<entry>
|
<entry>
|
||||||
<functionname>is_lower()</functionname>
|
<functionname>is_lower()</functionname>
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>is_print</entry>
|
<entry>is_print</entry>
|
||||||
<entry>Recognize printable characters</entry>
|
<entry>Recognize printable characters</entry>
|
||||||
|
@ -19,14 +19,14 @@
|
|||||||
C++ allows to work with multiple different instances of locales at once. If an algorithm
|
C++ allows to work with multiple different instances of locales at once. If an algorithm
|
||||||
manipulates some data in a way that requires the usage of locales, there must be a way
|
manipulates some data in a way that requires the usage of locales, there must be a way
|
||||||
to specify them. However, one instance of locales is sufficient for most of the applications,
|
to specify them. However, one instance of locales is sufficient for most of the applications,
|
||||||
and for a user it could be very tedious to specify which locales to use at every place
|
and for a user it could be very tedious to specify which locales to use at every place
|
||||||
where it is needed.
|
where it is needed.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Fortunately, the C++ standard allows to specify the <emphasis>global</emphasis> locales (using static member
|
Fortunately, the C++ standard allows to specify the <emphasis>global</emphasis> locales (using static member
|
||||||
function <code>std:locale::global()</code>). When instantiating an
|
function <code>std:locale::global()</code>). When instantiating an
|
||||||
<code>std::locale</code> class without explicit information, the instance will
|
<code>std::locale</code> class without explicit information, the instance will
|
||||||
be initialized with the <emphasis>global</emphasis> locale. This implies, that if an algorithm needs a locale,
|
be initialized with the <emphasis>global</emphasis> locale. This implies, that if an algorithm needs a locale,
|
||||||
it should have an <code>std::locale</code> parameter defaulting to <code>std::locale()</code>.
|
it should have an <code>std::locale</code> parameter defaulting to <code>std::locale()</code>.
|
||||||
If a user needs to specify locales explicitly, she can do so. Otherwise the <emphasis>global</emphasis>
|
If a user needs to specify locales explicitly, she can do so. Otherwise the <emphasis>global</emphasis>
|
||||||
locales are used.
|
locales are used.
|
||||||
|
@ -41,16 +41,16 @@
|
|||||||
Unlike in the STL algorithms, parameters are not specified only in the form
|
Unlike in the STL algorithms, parameters are not specified only in the form
|
||||||
of iterators. The STL convention allows for great flexibility,
|
of iterators. The STL convention allows for great flexibility,
|
||||||
but it has several limitations. It is not possible to <emphasis>stack</emphasis> algorithms together,
|
but it has several limitations. It is not possible to <emphasis>stack</emphasis> algorithms together,
|
||||||
because a container is passed in two parameters. Therefore it is not possible to use
|
because a container is passed in two parameters. Therefore it is not possible to use
|
||||||
a return value from another algorithm. It is considerably easier to write
|
a return value from another algorithm. It is considerably easier to write
|
||||||
<code>to_lower(str1)</code>, than <code>to_lower(str1.begin(), str1.end())</code>.
|
<code>to_lower(str1)</code>, than <code>to_lower(str1.begin(), str1.end())</code>.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The magic of <link linkend="string_algo.collection_traits">collection_traits</link>
|
The magic of <link linkend="string_algo.collection_traits">collection_traits</link>
|
||||||
provides a uniform way of handling different string types.
|
provides a uniform way of handling different string types.
|
||||||
If there is a need to pass a pair of iterators,
|
If there is a need to pass a pair of iterators,
|
||||||
<link linkend="string_algo.iterator_range"><code>iterator_range</code></link>
|
<link linkend="string_algo.iterator_range"><code>iterator_range</code></link>
|
||||||
can be used to package iterators into a structure with a compatible interface.
|
can be used to package iterators into a structure with a compatible interface.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
@ -72,7 +72,7 @@
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para><emphasis role="bold">Naming:</emphasis>
|
<para><emphasis role="bold">Naming:</emphasis>
|
||||||
Naming follows the conventions from the Standard C++ Library. If there is a
|
Naming follows the conventions from the Standard C++ Library. If there is a
|
||||||
copy and a mutable version of the same algorithm, the mutable version has no suffix
|
copy and a mutable version of the same algorithm, the mutable version has no suffix
|
||||||
and the copy version has the suffix <emphasis>_copy</emphasis>.
|
and the copy version has the suffix <emphasis>_copy</emphasis>.
|
||||||
Some algorithms have the prefix <emphasis>i</emphasis>
|
Some algorithms have the prefix <emphasis>i</emphasis>
|
||||||
(e.g. <functionname>ifind_first()</functionname>).
|
(e.g. <functionname>ifind_first()</functionname>).
|
||||||
@ -135,7 +135,7 @@
|
|||||||
<< endl; // prints "hello world! is written in the lower case"
|
<< endl; // prints "hello world! is written in the lower case"
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
The predicates determine whether if a substring is contained in the input string
|
The predicates determine whether if a substring is contained in the input string
|
||||||
under various conditions. The conditions are: a string starts with the substring,
|
under various conditions. The conditions are: a string starts with the substring,
|
||||||
ends with the substring,
|
ends with the substring,
|
||||||
simply contains the substring or if both strings are equal. See the reference for
|
simply contains the substring or if both strings are equal. See the reference for
|
||||||
@ -148,7 +148,7 @@
|
|||||||
useful string-related predicates and combinators ready for use.
|
useful string-related predicates and combinators ready for use.
|
||||||
These are located in the <headername>boost/algorithm/string/classification.hpp</headername> header.
|
These are located in the <headername>boost/algorithm/string/classification.hpp</headername> header.
|
||||||
Classification predicates can be combined using logical combinators to form
|
Classification predicates can be combined using logical combinators to form
|
||||||
a more complex expressions. For example: <code>is_from_range('a','z') || is_digit()</code>
|
a more complex expressions. For example: <code>is_from_range('a','z') || is_digit()</code>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
@ -190,13 +190,13 @@
|
|||||||
transform( result.begin(), result.end(), result.begin(), bind2nd(plus<char>(), 1) );
|
transform( result.begin(), result.end(), result.begin(), bind2nd(plus<char>(), 1) );
|
||||||
// text = "hello dommy!"
|
// text = "hello dommy!"
|
||||||
|
|
||||||
to_upper(result); // text == "hello doMMy!"
|
to_upper(result); // text == "hello doMMy!"
|
||||||
|
|
||||||
// iterator_range is convertible to bool
|
// iterator_range is convertible to bool
|
||||||
if(find_first(text, "dolly"))
|
if(find_first(text, "dolly"))
|
||||||
{
|
{
|
||||||
cout << "Dolly is there" << endl;
|
cout << "Dolly is there" << endl;
|
||||||
}
|
}
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
We have used <functionname>find_last()</functionname> to search the <code>text</code> for "ll".
|
We have used <functionname>find_last()</functionname> to search the <code>text</code> for "ll".
|
||||||
@ -208,10 +208,10 @@
|
|||||||
char[] because this type is supported by
|
char[] because this type is supported by
|
||||||
<link linkend="string_algo.collection_traits">collection_traits</link>.
|
<link linkend="string_algo.collection_traits">collection_traits</link>.
|
||||||
|
|
||||||
The following lines transform the result. Notice that
|
The following lines transform the result. Notice that
|
||||||
<link linkend="string_algo.iterator_range"><code>iterator_range</code></link> has familiar
|
<link linkend="string_algo.iterator_range"><code>iterator_range</code></link> has familiar
|
||||||
<code>begin()</code> and <code>end()</code> methods, so it can be used like any other STL container.
|
<code>begin()</code> and <code>end()</code> methods, so it can be used like any other STL container.
|
||||||
Also it is convertible to bool therefore it is easy to use find algorithms for a simple containment checking.
|
Also it is convertible to bool therefore it is easy to use find algorithms for a simple containment checking.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Find algorithms are located in <headername>boost/algorithm/string/find.hpp</headername>.
|
Find algorithms are located in <headername>boost/algorithm/string/find.hpp</headername>.
|
||||||
@ -261,8 +261,8 @@
|
|||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
There are two iterators provided <classname>find_iterator</classname> and
|
There are two iterators provided <classname>find_iterator</classname> and
|
||||||
<classname>split_iterator</classname>. The former iterates over substrings that are found using the specified
|
<classname>split_iterator</classname>. The former iterates over substrings that are found using the specified
|
||||||
Finder. The latter iterates over the gaps between these substrings.
|
Finder. The latter iterates over the gaps between these substrings.
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
string str1("abc-*-ABC-*-aBc");
|
string str1("abc-*-ABC-*-aBc");
|
||||||
@ -312,8 +312,8 @@
|
|||||||
<para>
|
<para>
|
||||||
Split algorithms are an extension to the find iterator for one common usage scenario.
|
Split algorithms are an extension to the find iterator for one common usage scenario.
|
||||||
These algorithms use a find iterator and store all matches into the provided
|
These algorithms use a find iterator and store all matches into the provided
|
||||||
container. This container must be able to hold copies (e.g. <code>std::string</code>) or
|
container. This container must be able to hold copies (e.g. <code>std::string</code>) or
|
||||||
references (e.g. <code>iterator_range</code>) of the extracted substrings.
|
references (e.g. <code>iterator_range</code>) of the extracted substrings.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Two algorithms are provided. <functionname>find_all()</functionname> finds all copies
|
Two algorithms are provided. <functionname>find_all()</functionname> finds all copies
|
||||||
@ -328,7 +328,7 @@
|
|||||||
find_vector_type FindVec; // #1: Search for separators
|
find_vector_type FindVec; // #1: Search for separators
|
||||||
ifind_all( FindVec, str1, "abc" ); // FindVec == { [abc],[ABC],[aBc] }
|
ifind_all( FindVec, str1, "abc" ); // FindVec == { [abc],[ABC],[aBc] }
|
||||||
|
|
||||||
typedef vector< string > split_vector_type;
|
typedef vector< string > split_vector_type;
|
||||||
|
|
||||||
split_vector_type SplitVec; // #2: Search for tokens
|
split_vector_type SplitVec; // #2: Search for tokens
|
||||||
split( SplitVec, str1, is_any_of<char>("-*") ); // SplitVec == { "hello abc","ABC","aBc goodbye" }
|
split( SplitVec, str1, is_any_of<char>("-*") ); // SplitVec == { "hello abc","ABC","aBc goodbye" }
|
||||||
|
Reference in New Issue
Block a user