diff --git a/include/boost/algorithm/string/case_conv.hpp b/include/boost/algorithm/string/case_conv.hpp index bc9c7b1..2c84fd6 100644 --- a/include/boost/algorithm/string/case_conv.hpp +++ b/include/boost/algorithm/string/case_conv.hpp @@ -32,14 +32,14 @@ namespace boost { /*! Each element of the input sequence is converted to lower 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 an output iterator. \param Output A output iterator to which the result will be copied \param Input An input collection \param Loc A locale used for conversion \return - An output iterator pointing just after last inserted character or - a copy of the input + An output iterator pointing just after last inserted character or + a copy of the input */ template inline OutputIteratorT @@ -58,8 +58,8 @@ namespace boost { //! Convert to lower case /*! - \overload - */ + \overload + */ template inline SequenceT to_lower_copy( const SequenceT& Input, @@ -103,14 +103,14 @@ namespace boost { /*! Each element of the input sequence is converted to upper 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 an output iterator \param Output A output iterator to which the result will be copied \param Input An input collection \param Loc A locale used for conversion \return - An output iterator pointing just after last inserted character or - a copy of the input + An output iterator pointing just after last inserted character or + a copy of the input */ template inline OutputIteratorT @@ -129,8 +129,8 @@ namespace boost { //! Convert to upper case /*! - \overload - */ + \overload + */ template inline SequenceT to_upper_copy( const SequenceT& Input, diff --git a/include/boost/algorithm/string/classification.hpp b/include/boost/algorithm/string/classification.hpp index 0d21854..f80582a 100644 --- a/include/boost/algorithm/string/classification.hpp +++ b/include/boost/algorithm/string/classification.hpp @@ -216,65 +216,65 @@ namespace boost { { return detail::is_from_rangeF(From,To); } - - // predicate combinators ---------------------------------------------------// + + // predicate combinators ---------------------------------------------------// - //! predicate 'and' composition predicate - /*! - Construct the \c class_and predicate. This predicate can be used - to logically combine two classification predicates. \c class_and holds, - if both predicates return true. + //! predicate 'and' composition predicate + /*! + Construct the \c class_and predicate. This predicate can be used + to logically combine two classification predicates. \c class_and holds, + if both predicates return true. - \param Pred1 The first predicate - \param Pred2 The second predicate - \return An instance of the \c class_and predicate - */ - template - inline detail::pred_andF - operator&&( - const predicate_facade& Pred1, - const predicate_facade& Pred2 ) - { - return detail::pred_andF( - static_cast(Pred1), - static_cast(Pred2) ); - } + \param Pred1 The first predicate + \param Pred2 The second predicate + \return An instance of the \c class_and predicate + */ + template + inline detail::pred_andF + operator&&( + const predicate_facade& Pred1, + const predicate_facade& Pred2 ) + { + return detail::pred_andF( + static_cast(Pred1), + static_cast(Pred2) ); + } - //! predicate 'or' composition predicate - /*! - Construct the \c class_or predicate. This predicate can be used - to logically combine two classification predicates. \c class_or holds, - if one of the predicates return true. + //! predicate 'or' composition predicate + /*! + Construct the \c class_or predicate. This predicate can be used + to logically combine two classification predicates. \c class_or holds, + if one of the predicates return true. - \param Pred1 The first predicate - \param Pred2 The second predicate - \return An instance of the \c class_or predicate - */ - template - inline detail::pred_orF - operator||( - const predicate_facade& Pred1, - const predicate_facade& Pred2 ) - { - return detail::pred_orF( - static_cast(Pred1), - static_cast(Pred2)); - } + \param Pred1 The first predicate + \param Pred2 The second predicate + \return An instance of the \c class_or predicate + */ + template + inline detail::pred_orF + operator||( + const predicate_facade& Pred1, + const predicate_facade& Pred2 ) + { + return detail::pred_orF( + static_cast(Pred1), + static_cast(Pred2)); + } - //! predicate negation operator - /*! - Construct the \c class_not predicate. This predicate represents a negation. - \c class_or holds, if of the predicates return false. + //! predicate negation operator + /*! + Construct the \c class_not predicate. This predicate represents a negation. + \c class_or holds, if of the predicates return false. - \param Pred The predicate to be negated - \return An instance of the \c class_not predicate - */ - template - inline detail::pred_notF - operator!( const predicate_facade& Pred ) - { - return detail::pred_notF(static_cast(Pred)); - } + \param Pred The predicate to be negated + \return An instance of the \c class_not predicate + */ + template + inline detail::pred_notF + operator!( const predicate_facade& Pred ) + { + return detail::pred_notF(static_cast(Pred)); + } } // namespace algorithm diff --git a/include/boost/algorithm/string/concept.hpp b/include/boost/algorithm/string/concept.hpp index 993fdd4..eaec2fd 100644 --- a/include/boost/algorithm/string/concept.hpp +++ b/include/boost/algorithm/string/concept.hpp @@ -24,7 +24,7 @@ namespace boost { //! Finder concept /*! Defines finder concept. Finder is a functor which selects - an arbitraty part of a container. Search is performed on + an arbitrary part of a string. Search is performed on the range specified by starting and ending iterators. Result of the find operation must be convertible to iterator_range. diff --git a/include/boost/algorithm/string/detail/classification.hpp b/include/boost/algorithm/string/detail/classification.hpp index 242e8e6..e05901e 100644 --- a/include/boost/algorithm/string/detail/classification.hpp +++ b/include/boost/algorithm/string/detail/classification.hpp @@ -22,7 +22,7 @@ namespace boost { namespace algorithm { namespace detail { - + // classification functors -----------------------------------------------// // is_classified functor diff --git a/include/boost/algorithm/string/erase.hpp b/include/boost/algorithm/string/erase.hpp index 029562a..0a25d71 100644 --- a/include/boost/algorithm/string/erase.hpp +++ b/include/boost/algorithm/string/erase.hpp @@ -29,13 +29,14 @@ namespace boost { //! Erase range algorithm /*! - Remove the given range from the input sequence. - The result is copied to the given output iterator. - + 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. + \param Output A output iterator to which the result will be copied \param Input An input sequence - \param SearchRange A range in the input to be substituted - \return An output iterator pointing just after last inserted character + \param SearchRange A range in the input to be removed + \return An output iterator pointing just after last inserted character or + a modified copy of the input */ template inline OutputIteratorT erase_range_copy( @@ -54,12 +55,7 @@ namespace boost { //! Erase range algorithm /*! - Remove the given range from the input sequence. - The result is a modified copy of the input. - - \param Input An input sequence - \param SearchRange A range in the input to be substituted - \return A modified copy of the input + \overload */ template inline SequenceT erase_range_copy( @@ -76,11 +72,11 @@ namespace boost { //! Erase range algorithm /*! - Remove the given range from the input sequence. + Remove the given range from the input. The input sequence is modified in-place. \param Input An input sequence - \param SearchRange A range in the input to be substituted + \param SearchRange A range in the input to be removed */ template inline void erase_range( @@ -99,13 +95,15 @@ namespace boost { //! Erase first algorithm /*! - Remove the first match of the search sequence from the input. - The result is copied to the given output iterator. + Remove the first match of the string from the input. + The result is a modified copy of the input. It is returned as a sequence + or copied to an output iterator. -H \param Output A output iterator to which the result will be copied - \param Input An input sequence - \param Search A string to be searched for. - \return An output iterator pointing just after last inserted character + \param Output A output iterator to which the result will be copied + \param Input An input string + \param Search A string to be searched for + \return An output iterator pointing just after last inserted character or + a modified copy of the input */ template< typename OutputIteratorT, @@ -125,12 +123,7 @@ H \param Output A output iterator to which the result will be copied //! Erase first algorithm /*! - Remove the first match of the search sequence from the input. - The result is a modified copy of the input. - - \param Input An input sequence - \param Search A string to be searched for. - \return A modified copy of the input + \overload */ template inline SequenceT erase_first_copy( @@ -145,10 +138,10 @@ H \param Output A output iterator to which the result will be copied //! Erase first algorithm /*! - Remove the first match of the search sequence from the input. + Remove the first match of the string from the input. The input sequence is modified in-place. - \param Input An input sequence + \param Input An input string \param Search A string to be searched for. */ template @@ -166,14 +159,17 @@ H \param Output A output iterator to which the result will be copied //! Erase first algorithm ( case insensitive ) /*! - Remove the first match of the search sequence from the input. - The result is copied to the given output iterator. Searching is case insensitive. + Remove the first match of the string from the input. + The result is a modified copy of the input. It is returned as a sequence + or copied to an output iterator. + Searching is case insensitive. \param Output A output iterator to which the result will be copied - \param Input An input sequence - \param Search A string to be searched for. + \param Input An input string + \param Search A string to be searched for \param Loc a locale used for case insensitive comparison - \return An output iterator pointing just after last inserted character + \return An output iterator pointing just after last inserted character or + a modified copy of the input */ template< typename OutputIteratorT, @@ -194,13 +190,7 @@ H \param Output A output iterator to which the result will be copied //! Erase first algorithm ( case insensitive ) /*! - Remove the first match of the search sequence from the input. - The result is a modified copy of the input. Searching is case insensitive. - - \param Input An input sequence - \param Search A string to be searched for. - \param Loc a locale used for case insensitive comparison - \return A modified copy of the input + \overload */ template inline SequenceT ierase_first_copy( @@ -216,11 +206,11 @@ H \param Output A output iterator to which the result will be copied //! Erase first algorithm ( case insensitive ) /*! - Remove the first match of the search sequence from the input. + Remove the first match of the string from the input. The input sequence is modified in-place. Searching is case insensitive. - \param Input An input sequence - \param Search A string to be searched for. + \param Input An input string + \param Search A string to be searched for \param Loc a locale used for case insensitive comparison */ template @@ -239,13 +229,15 @@ H \param Output A output iterator to which the result will be copied //! Erase last algorithm /*! - Remove the last match of the search sequence from the input. - The result is copied to the given output iterator. + Remove the last match of the string from the input. + The result is a modified copy of the input. It is returned as a sequence + or copied to an output iterator. \param Output A output iterator to which the result will be copied - \param Input An input sequence - \param Search A string to be searched for. - \return An output iterator pointing just after last inserted character + \param Input An input string + \param Search A string to be searched for. + \return An output iterator pointing just after last inserted character or + a modified copy of the input */ template< typename OutputIteratorT, @@ -265,12 +257,7 @@ H \param Output A output iterator to which the result will be copied //! Erase last algorithm /*! - Remove the last match of the search sequence from the input. - The result is a modified copy of the input. - - \param Input An input sequence - \param Search A string to be searched for. - \return A modified copy of the input + \overload */ template inline SequenceT erase_last_copy( @@ -285,11 +272,11 @@ H \param Output A output iterator to which the result will be copied //! Erase last algorithm /*! - Remove the last match of the search sequence from the input. + Remove the last match of the string from the input. The input sequence is modified in-place. - \param Input An input sequence - \param Search A string to be searched for. + \param Input An input string + \param Search A string to be searched for */ template inline void erase_last( @@ -306,14 +293,17 @@ H \param Output A output iterator to which the result will be copied //! Erase last algorithm ( case insensitive ) /*! - Remove the last match of the search sequence from the input. - The result is copied to the given output iterator. Searching is case insensitive. + Remove the last match of the string from the input. + The result is a modified copy of the input. It is returned as a sequence + or copied to an output iterator. + Searching is case insensitive. \param Output A output iterator to which the result will be copied - \param Input An input sequence - \param Search A string to be searched for. + \param Input An input string + \param Search A string to be searched for \param Loc a locale used for case insensitive comparison - \return An output iterator pointing just after last inserted character + \return An output iterator pointing just after last inserted character or + a modified copy of the input */ template< typename OutputIteratorT, @@ -334,13 +324,7 @@ H \param Output A output iterator to which the result will be copied //! Erase last algorithm ( case insensitive ) /*! - Remove the last match of the search sequence from the input. - The result is a modified copy of the input. Searching is case insensitive. - - \param Input An input sequence - \param Search A string to be searched for. - \param Loc a locale used for case insensitive comparison - \return A modified copy of the input + \overload */ template inline SequenceT ierase_last_copy( @@ -356,11 +340,11 @@ H \param Output A output iterator to which the result will be copied //! Erase last algorithm ( case insensitive ) /*! - Remove the last match of the search sequence from the input. + Remove the last match of the string from the input. The input sequence is modified in-place. Searching is case insensitive. - \param Input An input sequence - \param Search A string to be searched for. + \param Input An input string + \param Search A string to be searched for \param Loc a locale used for case insensitive comparison */ template @@ -379,14 +363,17 @@ H \param Output A output iterator to which the result will be copied //! Erase nth algorithm /*! - Remove the Nth match of the search sequence in the input. - The result is copied to the given output iterator. + Remove the Nth match of the string in the input. + The result is a modified copy of the input. It is returned as a sequence + or copied to an output iterator. + \param Output A output iterator to which the result will be copied - \param Input An input sequence - \param Search A string to be searched for. + \param Input An input string + \param Search A string to be searched for \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 + \return An output iterator pointing just after last inserted character or + a modified copy of the input */ template< typename OutputIteratorT, @@ -407,13 +394,7 @@ H \param Output A output iterator to which the result will be copied //! Erase nth algorithm /*! - Remove the Nth match of the search sequence in the input. - The result is a modified copy of the input. - - \param Input An input sequence - \param Search A string to be searched for. - \param Nth An index of the match to be replaced. The index is 0-based. - \return A modified copy of the input + \overload */ template inline SequenceT erase_nth_copy( @@ -429,10 +410,10 @@ H \param Output A output iterator to which the result will be copied //! Erase nth algorithm /*! - Remove the Nth match of the search sequence in the input. + Remove the Nth match of the string in the input. The input sequence is modified in-place. - \param Input An input sequence + \param Input An input string \param Search A string to be searched for. \param Nth An index of the match to be replaced. The index is 0-based. */ @@ -452,15 +433,18 @@ H \param Output A output iterator to which the result will be copied //! Erase nth algorithm ( case insensitive ) /*! - Remove the Nth match of the search sequence in the input. - The result is copied to the given output iterator. Searching is case insensitive. + Remove the Nth match of the string in the input. + The result is a modified copy of the input. It is returned as a sequence + or copied to an output iterator. + Searching is case insensitive. \param Output A output iterator to which the result will be copied - \param Input An input sequence - \param Search A string to be searched for. + \param Input An input string + \param Search A string to be searched for. \param Nth An index of the match to be replaced. The index is 0-based. \param Loc a locale used for case insensitive comparison - \return An output iterator pointing just after last inserted character + \return An output iterator pointing just after last inserted character or + a modified copy of the input */ template< typename OutputIteratorT, @@ -482,14 +466,7 @@ H \param Output A output iterator to which the result will be copied //! Erase nth algorithm /*! - Remove the Nth match of the search sequence in the input. - The result is a modified copy of the input. Searching is case insensitive. - - \param Input An input sequence - \param Search A string to be searched for. - \param Nth An index of the match to be replaced. The index is 0-based. - \param Loc a locale used for case insensitive comparison - \return A modified copy of the input + \overload */ template inline SequenceT ierase_nth_copy( @@ -506,10 +483,10 @@ H \param Output A output iterator to which the result will be copied //! Erase nth algorithm /*! - Remove the Nth match of the search sequence in the input. + Remove the Nth match of the string in the input. The input sequence is modified in-place. Searching is case insensitive. - \param Input An input sequence + \param Input An input string \param Search A string to be searched for. \param Nth An index of the match to be replaced. The index is 0-based. \param Loc a locale used for case insensitive comparison @@ -532,13 +509,17 @@ H \param Output A output iterator to which the result will be copied //! Erase all algorithm /*! - Remove all the occurrences of the search sequence from the input. - The result is copied to the given output iterator. + 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 + or copied to an output iterator. + \param Output A output iterator to which the result will be copied \param Input An input sequence \param Search A string to be searched for. - \return An output iterator pointing just after last inserted character + \return An output iterator pointing just after last inserted character or + a modified copy of the input + */ template< typename OutputIteratorT, @@ -558,12 +539,7 @@ H \param Output A output iterator to which the result will be copied //! Erase all algorithm /*! - Remove all the occurrences of the search sequence from the input. - The result is a modified copy of the input. - - \param Input An input sequence - \param Search A string to be searched for. - \return A modified copy of the input + \overload */ template inline SequenceT erase_all_copy( @@ -578,10 +554,10 @@ H \param Output A output iterator to which the result will be copied //! Erase all algorithm /*! - Remove all the occurrences of the search sequence from the input. + Remove all the occurrences of the string from the input. The input sequence is modified in-place. - \param Input An input sequence + \param Input An input string \param Search A string to be searched for. */ template @@ -599,14 +575,18 @@ H \param Output A output iterator to which the result will be copied //! Erase all algorithm ( case insensitive ) /*! - Remove all the occurrences of the search sequence from the input. - The result is copied to the given output iterator. Searching is case insensitive. + 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 + or copied to an output iterator. + Searching is case insensitive. \param Output A output iterator to which the result will be copied - \param Input An input sequence - \param Search A string to be searched for. + \param Input An input string + \param Search A string to be searched for \param Loc a locale used for case insensitive comparison - \return An output iterator pointing just after last inserted character + \return An output iterator pointing just after last inserted character or + a modified copy of the input + */ template< typename OutputIteratorT, @@ -627,13 +607,7 @@ H \param Output A output iterator to which the result will be copied //! Erase all algorithm ( case insensitive ) /*! - Remove all the occurrences of the search sequence from the input. - The result is a modified copy of the input. Searching is case insensitive. - - \param Input An input sequence - \param Search A string to be searched for. - \param Loc a locale used for case insensitive comparison - \return A modified copy of the input + \overload */ template inline SequenceT ierase_all_copy( @@ -649,10 +623,10 @@ H \param Output A output iterator to which the result will be copied //! Erase all algorithm ( case insensitive ) /*! - Remove all the occurrences of the search sequence from the input. + Remove all the occurrences of the string from the input. The input sequence is modified in-place. Searching is case insensitive. - \param Input An input sequence + \param Input An input string \param Search A string to be searched for. \param Loc a locale used for case insensitive comparison */ @@ -674,12 +648,15 @@ H \param Output A output iterator to which the result will be copied /*! Remove the head from the input. Head is a prefix of a seqence of given size. If the sequence is shorter then required, whole sequence if - considered to be the head. The result is copied to the given output iterator. + 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. + \param Output A output iterator to which the result will be copied - \param Input An input sequence + \param Input An input string \param N A length of the head - \return An output iterator pointing just after last inserted character + \return An output iterator pointing just after last inserted character or + a modified copy of the input */ template< typename OutputIteratorT, @@ -698,13 +675,7 @@ H \param Output A output iterator to which the result will be copied //! Erase head algorithm /*! - Remove the head from the input. Head is a prefix of a seqence of given size. - If the sequence is shorter then required, whole sequence if - considered to be the head. The result is a modified copy of the input. - - \param Input An input sequence - \param N A length of the head - \return A modified copy of the input + \overload */ template inline SequenceT erase_head_copy( @@ -723,7 +694,7 @@ H \param Output A output iterator to which the result will be copied If the sequence is shorter then required, whole sequence if considered to be the head. The input sequence is modified in-place. - \param Input An input sequence + \param Input An input string \param N A length of the head */ template @@ -743,12 +714,16 @@ H \param Output A output iterator to which the result will be copied /*! Remove the tail from the input. Tail is a suffix of a seqence of given size. If the sequence is shorter then required, whole sequence if - considered to be the tail. The result is copied to the given output iterator. + considered to be the tail. + The result is a modified copy of the input. It is returned as a sequence + or copied to an output iterator. \param Output A output iterator to which the result will be copied - \param Input An input sequence + \param Input An input string \param N A length of the head - \return An output iterator pointing just after last inserted character + \return An output iterator pointing just after last inserted character or + a modified copy of the input + */ template< typename OutputIteratorT, @@ -767,13 +742,7 @@ H \param Output A output iterator to which the result will be copied //! Erase tail algorithm /*! - Remove the tail from the input. Tail is a suffix of a seqence of given size. - If the sequence is shorter then required, whole sequence is - considered to be the tail. The result is a modified copy of the input. - - \param Input An input sequence - \param N A length of the head - \return A modified copy of the input + \overload */ template inline SequenceT erase_tail_copy( @@ -792,7 +761,7 @@ H \param Output A output iterator to which the result will be copied If the sequence is shorter then required, whole sequence is considered to be the tail. The input sequence is modified in-place. - \param Input An input sequence + \param Input An input string \param N A length of the head */ template diff --git a/include/boost/algorithm/string/find.hpp b/include/boost/algorithm/string/find.hpp index 5b707b2..28326d6 100644 --- a/include/boost/algorithm/string/find.hpp +++ b/include/boost/algorithm/string/find.hpp @@ -19,7 +19,7 @@ /*! \file Defines a set of find algorithms. The algorithms are searching - for a subsequence of the input. The result is given as an \c iterator_range + for a substring if the input. The result is given as an \c iterator_range delimiting the substring. */ @@ -32,7 +32,7 @@ namespace boost { /*! Search the input using the given finder. - \param Input A collection which will be searched. + \param Input A string which will be searched. \param Finder Finder object used for searching. \return An \c iterator_range delimiting the match. @@ -54,10 +54,9 @@ namespace boost { //! Find first algorithm /*! - Search for a first match of search sequence in the - input collection. + Search for the first match of the string in the input. - \param Input A container which will be searched. + \param Input A string which will be searched. \param Search A string to be searched for. \return An \c iterator_range delimiting the match. @@ -78,10 +77,10 @@ namespace boost { //! Find first algorithm ( case insensitive ) /*! - Search for a first match of search sequence in the - input collection. Searching is case insensitive. + Search for the first match of the string in the input. + Searching is case insensitive. - \param Input A container which will be searched. + \param Input A string which will be searched. \param Search A string to be searched for. \param Loc a locale used for case insensitive comparison \return @@ -106,10 +105,9 @@ namespace boost { //! Find last algorithm /*! - Search for a last match of search sequence in the - input collection. + Search for the last match of the string in the input. - \param Input A container which will be searched. + \param Input A string which will be searched. \param Search A string to be searched for. \return An \c iterator_range delimiting the match. @@ -130,10 +128,10 @@ namespace boost { //! Find last algorithm ( case insensitive ) /*! - Search for a last match of search sequence in the - input collection. Searching is case insensitive. + Search for the last match a string in the input. + Searching is case insensitive. - \param Input A container which will be searched. + \param Input A string which will be searched. \param Search A string to be searched for. \param Loc a locale used for case insensitive comparison \return @@ -158,12 +156,12 @@ namespace boost { //! Find n-th algorithm /*! - Search for an n-th match of search sequence in the - input collection. + Search for the n-th (zero-indexed) match of the string in the + input. - \param Input A container which will be searched. + \param Input A string which will be searched. \param Search A string to be searched for. - \param Nth An index of the match to be found. + \param Nth An index (zero-indexed) of the match to be found. \return An \c iterator_range delimiting the match. Returned iterator is either \c Collection1T::iterator or @@ -184,12 +182,12 @@ namespace boost { //! Find n-th algorithm ( case insensitive ). /*! - Search for an n-th match of search sequence in the - input collection. Searching is case insensitive. + Search for the n-th (zero-indexed) match of the string in the + input. Searching is case insensitive. - \param Input A container which will be searched. + \param Input A string which will be searched. \param Search A string to be searched for. - \param Nth An index 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 \return An \c iterator_range delimiting the match. @@ -214,11 +212,11 @@ namespace boost { //! Find head algorithm /*! - Get the head of the input. Head is a prefix of - a seqence of given size. If the sequence is shorter then required, - whole sequence if considered to be the head. + Get the head of the input. Head is a prefix of the string of the + given size. If the input is shorter then required, whole input if considered + to be the head. - \param Input A container which will be searched. + \param Input An input string \param N A length of the head \return An \c iterator_range delimiting the match. @@ -241,11 +239,11 @@ namespace boost { //! Find tail algorithm /*! - Get the tail of the input. Head is a suffix of - a seqence of given size. If the sequence is shorter then required, - whole sequence if considered to be the tail. + Get the head of the input. Head is a suffix of the string of the + given size. If the input is shorter then required, whole input if considered + to be the tail. - \param Input A container which will be searched. + \param Input An input string \param N A length of the tail \return An \c iterator_range delimiting the match. @@ -268,10 +266,11 @@ namespace boost { //! Find token algorithm /*! - Look for a given token in the collection. Token is specified by a predicate. - If bCompressed is given, adjacent tokens are considered to be one match. + Look for a given token in the string. Token is a character that matches the + given predicate. + If the "token compress mode" is enabled, adjacent tokens are considered to be one match. - \param Input A container which will be searched. + \param Input A input string. \param Pred An unary predicate to identify a token \param eCompress Enable/Disable compressing of adjacent tokens \return diff --git a/include/boost/algorithm/string/find_format.hpp b/include/boost/algorithm/string/find_format.hpp index 9ba3a93..9d145a8 100644 --- a/include/boost/algorithm/string/find_format.hpp +++ b/include/boost/algorithm/string/find_format.hpp @@ -33,13 +33,15 @@ namespace boost { /*! Use the Finder to search for a substring. Use the Formatter to format this substring and replace it in the input. - The resulting sequence is copied to the given output iterator. + The result is a modified copy of the input. It is returned as a sequence + or copied to an output iterator. \param Output A output iterator to which the result will be copied \param Input An input sequence \param Finder A Finder object used to search for a match to be replaced \param Formatter A Formatter object used to format a match - \return An output iterator pointing just after last inserted character + \return An output iterator pointing just after last inserted character or + a modified copy of the input */ template< typename OutputIteratorT, @@ -71,14 +73,7 @@ namespace boost { //! Generic replace algorithm /*! - Use the Finder to search for a substring. Use the Formatter to format - this substring and replace it in the input. - The result is the modified copy of the input. - - \param Input An input sequence - \param Finder A Finder object used to search for a match to be replaced - \param Formatter A Formatter object used to format a match - \return A modified copy of the input + \overload */ template< typename SequenceT, @@ -147,13 +142,15 @@ namespace boost { Use the Finder to search for a substring. Use the Formatter to format this substring and replace it in the input. Repeat this for all matching substrings. - The resulting sequence is copied to the given output iterator. + The result is a modified copy of the input. It is returned as a sequence + or copied to an output iterator. \param Output A output iterator to which the result will be copied \param Input An input sequence \param Finder A Finder object used to search for a match to be replaced \param Formatter A Formatter object used to format a match - \return An output iterator pointing just after last inserted character + \return An output iterator pointing just after last inserted character or + a modified copy of the input */ template< typename OutputIteratorT, @@ -185,15 +182,7 @@ namespace boost { //! Generic replace all algorithm /*! - Use the Finder to search for a substring. Use the Formatter to format - this substring and replace it in the input. Repeat this for all matching - substrings. - The result is the modified copy of the input. - - \param Input An input sequence - \param Finder A Finder object used to search for a match to be replaced - \param Formatter A Formatter object used to format a match - \return A modified copy of the input + \overload */ template< typename SequenceT, diff --git a/include/boost/algorithm/string/find_iterator.hpp b/include/boost/algorithm/string/find_iterator.hpp index e6bc8a4..3ac1397 100644 --- a/include/boost/algorithm/string/find_iterator.hpp +++ b/include/boost/algorithm/string/find_iterator.hpp @@ -26,7 +26,7 @@ namespace boost { //! find_iterator /*! Find iterator encapsulates a Finder and allows - an incremental searching in the sequence. + an incremental searching in a string. Each increment moves the iterator to the next match. Find iterator is readable forward traversal iterator. @@ -168,7 +168,7 @@ namespace boost { //! find iterator construction helper /*! - * Construct a find iterator to iterate through the specified collection + * Construct a find iterator to iterate through the specified string */ template inline find_iterator< @@ -186,7 +186,7 @@ namespace boost { //! split_iterator /*! Split iterator encapsulates a Finder and allows - an incremental searching in the sequence. + an incremental searching in a string. Unlike the find iterator, split iterator iterates through gasps between matches. @@ -264,8 +264,8 @@ namespace boost { */ template split_iterator( - CollectionT& Col, - FinderT Finder ) : + CollectionT& Col, + FinderT Finder ) : detail::find_iterator_base(Finder,0), m_Match(begin(Col),begin(Col)), m_Next(begin(Col)), diff --git a/include/boost/algorithm/string/finder.hpp b/include/boost/algorithm/string/finder.hpp index a7d35fe..acbee49 100644 --- a/include/boost/algorithm/string/finder.hpp +++ b/include/boost/algorithm/string/finder.hpp @@ -19,8 +19,7 @@ /*! \file Defines Finder generators. Finder object is a functor which is able to - find a subsequence matching a specific criterium in an input - sequence. + find a substring matching a specific criterium in the input. Finders are used as a pluggable components for replace, find and split facilities. This header contains generator functions for finders provided in this library. @@ -34,10 +33,11 @@ namespace boost { //! "First" finder /*! Construct the \c first_finder. The finder searches for the first - occurrence of the search sequence in a given input. + occurrence of the string in a given input. The result is given as a \c iterator_range delimiting the match. - \param Search A sequence to be searched for. + \param Search A string to be searched for. + \param Comp An element comparison predicate \return An instance of the \c first_finder object */ template @@ -55,15 +55,7 @@ namespace boost { //! "First" finder /*! - Construct the \c first_finder. The finder searches for the first - occurrence of the search sequence in a given input. - The result is given as a \c iterator_range delimiting the match. - - Elements are compared using the given predicate. - - \param Search A sequence to be searched for. - \param Comp An element comparison predicate - \return An instance of the \c first_finder object + \overload */ template inline detail::first_finderF< @@ -82,10 +74,11 @@ namespace boost { //! "Last" finder /*! Construct the \c last_finder. The finder searches for the last - occurrence of the search sequence in a given input. + occurrence of the string in a given input. The result is given as a \c iterator_range delimiting the match. - \param Search A sequence to be searched for. + \param Search A string to be searched for. + \param Comp An element comparison predicate \return An instance of the \c last_finder object */ template @@ -102,15 +95,7 @@ namespace boost { } //! "Last" finder /*! - Construct the \c last_finder. The finder searches for the last - occurrence of the search sequence in a given input. - The result is given as a \c iterator_range delimiting the match. - - Elements are compared using the given predicate. - - \param Search A sequence to be searched for. - \param Comp An element comparison predicate - \return An instance of the \c last_finder object + \overload */ template inline detail::last_finderF< @@ -127,12 +112,13 @@ namespace boost { //! "Nth" finder /*! - Construct the \c nth_finder. The finder searches for the n-th - occurrence of the search sequence in a given input. + Construct the \c nth_finder. The finder searches for the n-th (zero-indexed) + occurrence of the string in a given input. The result is given as a \c iterator_range delimiting the match. - \param Search A sequence to be searched for. + \param Search A string to be searched for. \param Nth An index of the match to be find + \param Comp An element comparison predicate \return An instance of the \c nth_finder object */ template @@ -151,16 +137,7 @@ namespace boost { } //! "Nth" finder /*! - Construct the \c nth_finder. The finder searches for the n-th - occurrence of the search sequence in a given input. - The result is given as a \c iterator_range delimiting the match. - - Elements are compared using the given predicate. - - \param Search A sequence to be searched for. - \param Nth An index of the match to be find - \param Comp An element comparison predicate - \return An instance of the \c nth_finder object + \overload */ template inline detail::nth_finderF< @@ -181,7 +158,7 @@ namespace boost { //! "Head" finder /*! Construct the \c head_finder. The finder returns a head of a given - input. Head is a prefix of a sequence up to n elements in + input. Head is a prefix of a string up to n elements in size. If an input has less then n elements, whole input is considered a head. The result is given as a \c iterator_range delimiting the match. @@ -198,7 +175,7 @@ namespace boost { //! "Tail" finder /*! Construct the \c tail_finder. The finder returns a tail of a given - input. Tail is a suffix of the sequence up to n elements in + input. Tail is a suffix of a string up to n elements in size. If an input has less then n elements, whole input is considered a head. The result is given as a \c iterator_range delimiting the match. @@ -219,9 +196,9 @@ namespace boost { algorithm, with an exception that it return a range of instead of a single iterator. - If bCompress is set to true, adjacent matching tokens are + If "compress token mode" is enabled, adjacent matching tokens are concatenated into one match. Thus the finder can be used to - search for continuous segments of elements satisfying the + search for continuous segments of characters satisfying the given predicate. The result is given as a \c iterator_range delimiting the match. @@ -247,6 +224,7 @@ namespace boost { \param Begin Beginning of the range \param End End of the range + \param Range The range. \return An instance of the \c range_finger object */ template< typename ForwardIteratorT > @@ -259,9 +237,7 @@ namespace boost { } //! "Range" finder - /*! - \param Range The range. - + /*! \overload */ template< typename ForwardIteratorT > diff --git a/include/boost/algorithm/string/predicate.hpp b/include/boost/algorithm/string/predicate.hpp index b2c1dca..2dc239d 100644 --- a/include/boost/algorithm/string/predicate.hpp +++ b/include/boost/algorithm/string/predicate.hpp @@ -34,8 +34,8 @@ namespace boost { /*! This predicate holds when the test collection is a prefix of the Input. In other word, if the input starts with the test. - When optional predicate is specified, it is used for character-wise - comparison. + When optional predicate is specified, it is used for character-wise + comparison. \param Input An input sequence \param Test A test sequence @@ -71,8 +71,8 @@ namespace boost { //! 'Starts with' predicate /*! - \overload - */ + \overload + */ template inline bool starts_with( const Collection1T& Input, @@ -108,8 +108,8 @@ namespace boost { /*! This predicate holds when the test container is a suffix of the Input. In other word, if the input ends with the test. - When optional predicate is specified, it is used for character-wise - comparison. + When optional predicate is specified, it is used for character-wise + comparison. \param Input An input sequence @@ -141,7 +141,7 @@ namespace boost { //! 'Ends with' predicate /*! - \overload + \overload */ template inline bool ends_with( @@ -177,7 +177,7 @@ namespace boost { /*! This predicate holds when the test container is contained in the Input. When optional predicate is specified, it is used for character-wise - comparison. + comparison. \param Input An input sequence \param Test A test sequence @@ -201,8 +201,8 @@ namespace boost { //! 'Contains' predicate /*! - \overload - */ + \overload + */ template inline bool contains( const Collection1T& Input, @@ -237,7 +237,7 @@ namespace boost { This predicate holds when the test container is equal to the input container i.e. all elements in both containers are same. When optional predicate is specified, it is used for character-wise - comparison. + comparison. \param Input An input sequence \param Test A test sequence @@ -275,7 +275,7 @@ namespace boost { //! 'Equals' predicate /*! - \overload + \overload */ template inline bool equals( diff --git a/include/boost/algorithm/string/predicate_facade.hpp b/include/boost/algorithm/string/predicate_facade.hpp index 37ac679..70730f8 100644 --- a/include/boost/algorithm/string/predicate_facade.hpp +++ b/include/boost/algorithm/string/predicate_facade.hpp @@ -24,12 +24,12 @@ namespace boost { // predicate facade ------------------------------------------------------// - //! Predicate facade + //! Predicate facade /*! This class allows to recognize classification predicates, so that they can be combined using composition operators. - Every classification predicate must be derived from this class. + Every classification predicate must be derived from this class. */ template struct predicate_facade {}; diff --git a/include/boost/algorithm/string/regex.hpp b/include/boost/algorithm/string/regex.hpp index 0e4842c..8898e93 100644 --- a/include/boost/algorithm/string/regex.hpp +++ b/include/boost/algorithm/string/regex.hpp @@ -30,7 +30,7 @@ namespace boost { //! Find regex algorithm /*! - Search for a subsequence matching the given regex in the input. + Search for a substring matching the given regex in the input. \param Input A container which will be searched. \param Rx A regular expression @@ -60,15 +60,18 @@ namespace boost { //! Replace regex algorithm /*! - Search for a subsequence matching given regex and format it with - the specified format. The result is copied to the given output iterator. + Search for a substring matching given regex and format it with + the specified format. + The result is a modified copy of the input. It is returned as a sequence + or copied to an output iterator. \param Output A output iterator to which the result will be copied - \param Input An input sequence + \param Input An input string \param Rx A regular expression \param Format Regex format definition \param Flags Regex options - \return An output iterator pointing just after last inserted character + \return An output iterator pointing just after last inserted character or + a modified copy of the input */ template< typename OutputIteratorT, @@ -92,14 +95,7 @@ namespace boost { //! Replace regex algorithm /*! - Search for a subsequence matching given regex and format it with - the specified format. The result is a modified copy of the input. - - \param Input An input sequence - \param Rx A regular expression - \param Format Regex format definition - \param Flags Regex options - \return A modified copy of the input + \overload */ template< typename SequenceT, @@ -120,10 +116,10 @@ namespace boost { //! Replace regex algorithm /*! - Search for a subsequence matching given regex and format it with - the specified format. The input sequence is modified in-place. + Search for a substring matching given regex and format it with + the specified format. The input string is modified in-place. - \param Input An input sequence + \param Input An input string \param Rx A regular expression \param Format Regex format definition \param Flags Regex options @@ -149,15 +145,17 @@ namespace boost { //! Replace all regex algorithm /*! - Format all subsequences, matching given regex, with the specified format. - The result is copied to the given output iterator. + 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 + or copied to an output iterator. \param Output A output iterator to which the result will be copied - \param Input An input sequence + \param Input An input string \param Rx A regular expression \param Format Regex format definition \param Flags Regex options - \return An output iterator pointing just after last inserted character + \return An output iterator pointing just after last inserted character or + a modified copy of the input */ template< typename OutputIteratorT, @@ -181,14 +179,7 @@ namespace boost { //! Replace all regex algorithm /*! - Format all subsequences, mathing given regex, with the specified format. - The result is a modified copy of the input. - - \param Input An input sequence - \param Rx A regular expression - \param Format Regex format definition - \param Flags Regex options - \return A modified copy of the input + \overload */ template< typename SequenceT, @@ -209,10 +200,10 @@ namespace boost { //! Replace all regex algorithm /*! - Format all subsequences, matching given regex, with the specified format. - The input sequence is modified in-place. + Format all substrings, matching given regex, with the specified format. + The input string is modified in-place. - \param Input An input sequence + \param Input An input string \param Rx A regular expression \param Format Regex format definition \param Flags Regex options @@ -238,14 +229,16 @@ namespace boost { //! Erase regex algorithm /*! - Remove a subsequence matching given regex from the input. - The result is copied to the given output iterator. + Remove a substring matching given regex from the input. + The result is a modified copy of the input. It is returned as a sequence + or copied to an output iterator. \param Output A output iterator to which the result will be copied - \param Input An input sequence + \param Input An input string \param Rx A regular expression \param Flags Regex options - \return An output iterator pointing just after last inserted character + \return An output iterator pointing just after last inserted character or + a modified copy of the input */ template< typename OutputIteratorT, @@ -267,13 +260,7 @@ namespace boost { //! Erase regex algorithm /*! - Remove a subsequence matching given regex from the input. - The result is a modified copy of the input. - - \param Input An input sequence - \param Rx A regular expression - \param Flags Regex options - \return A modified copy of the input + \overload */ template< typename SequenceT, @@ -292,10 +279,10 @@ namespace boost { //! Erase regex algorithm /*! - Remove a subsequence matching given regex from the input. - The input sequence is modified in-place. + Remove a substring matching given regex from the input. + The input string is modified in-place. - \param Input An input sequence + \param Input An input string \param Rx A regular expression \param Flags Regex options */ @@ -318,14 +305,17 @@ namespace boost { //! Erase all regex algorithm /*! - Erase all subsequences, matching given regex, from the input. - The result is copied to the given output iterator. + Erase all substrings, matching given regex, from the input. + The result is a modified copy of the input. It is returned as a sequence + or copied to an output iterator. + \param Output A output iterator to which the result will be copied - \param Input An input sequence + \param Input An input string \param Rx A regular expression \param Flags Regex options - \return An output iterator pointing just after last inserted character + \return An output iterator pointing just after last inserted character or + a modified copy of the input */ template< typename OutputIteratorT, @@ -347,13 +337,7 @@ namespace boost { //! Erase all regex algorithm /*! - Erase all subsequences, matching given regex, from the input. - The result is a modified copy of the input. - - \param Input An input sequence - \param Rx A regular expression - \param Flags Regex options - \return A modified copy of the input + \overload */ template< typename SequenceT, @@ -372,10 +356,10 @@ namespace boost { //! Erase all regex algorithm /*! - Erase all subsequences, matching given regex, from the input. - The input sequence is modified in-place. + Erase all substrings, matching given regex, from the input. + The input string is modified in-place. - \param Input An input sequence + \param Input An input string \param Rx A regular expression \param Flags Regex options */ diff --git a/include/boost/algorithm/string/replace.hpp b/include/boost/algorithm/string/replace.hpp index e4d8027..40be2b0 100644 --- a/include/boost/algorithm/string/replace.hpp +++ b/include/boost/algorithm/string/replace.hpp @@ -30,14 +30,16 @@ namespace boost { //! Replace range algorithm /*! - Substitute the given range in the input sequence with the - format sequence. The result is copied to the given output iterator. - + Replace the given range in the input string. + The result is a modified copy of the input. It is returned as a sequence + or copied to an output iterator. + \param Output A output iterator to which the result will be copied - \param Input An input sequence + \param Input An input string \param SearchRange A range in the input to be substituted - \param Format A substitute sequence - \return An output iterator pointing just after last inserted character + \param Format A substitute string + \return An output iterator pointing just after last inserted character or + a modified copy of the input */ template< typename OutputIteratorT, @@ -60,13 +62,7 @@ namespace boost { //! Replace range algorithm /*! - Substitute a given range in the input sequence with the - format sequence. The result is a modified copy of the input. - - \param Input An input sequence - \param SearchRange A range in the input to be substituted - \param Format A substitute sequence - \return A modified copy of the input + \overload */ template inline SequenceT replace_range_copy( @@ -84,12 +80,12 @@ namespace boost { //! Replace range algorithm /*! - Substitute a given range in the input sequence with the - format sequence. The input sequence is modified in-place. + Replace the given range in the input string. + The input sequence is modified in-place. - \param Input An input sequence + \param Input An input string \param SearchRange A range in the input to be substituted - \param Format A substitute sequence + \param Format A substitute string */ template inline void replace_range( @@ -109,14 +105,17 @@ namespace boost { //! Replace first algorithm /*! - Substitute a first match of the search sequence in the input - with the format sequence. The result is copied to the given output iterator. - + Replace the first match of the search string in the input + with the format string. + The result is a modified copy of the input. It is returned as a sequence + or copied to an output iterator. + \param Output A output iterator to which the result will be copied - \param Input An input sequence - \param Search A string to be searched for. - \param Format A substitute sequence - \return An output iterator pointing just after last inserted character + \param Input An input string + \param Search A string to be searched for + \param Format A substitute string + \return An output iterator pointing just after last inserted character or + a modified copy of the input */ template< typename OutputIteratorT, @@ -138,13 +137,7 @@ namespace boost { //! Replace first algorithm /*! - Substitute a first match of the search sequence in the input - with the format sequence. The result is a modified copy of the input. - - \param Input An input sequence - \param Search A string to be searched for. - \param Format A substitute sequence - \return A modified copy of the input + \overload */ template inline SequenceT replace_first_copy( @@ -160,12 +153,12 @@ namespace boost { //! Replace first algorithm /*! - Substitute a first match of the search sequence in the input - with the format sequence. The input sequence is modified in-place. + replace the first match of the search string in the input + with the format string. The input sequence is modified in-place. - \param Input An input sequence - \param Search A string to be searched for. - \param Format A substitute sequence + \param Input An input string + \param Search A string to be searched for + \param Format A substitute string */ template inline void replace_first( @@ -183,16 +176,19 @@ namespace boost { //! Replace first algorithm ( case insensitive ) /*! - Substitute a first match of the search sequence in the input - with the format sequence. The result is a modified copy of the input. + Replace the first match of the search string in the input + with the format string. + The result is a modified copy of the input. It is returned as a sequence + or copied to an output iterator. Searching is case insensitive. \param Output A output iterator to which the result will be copied - \param Input An input sequence - \param Search A string to be searched for. - \param Format A substitute sequence + \param Input An input string + \param Search A string to be searched for + \param Format A substitute string \param Loc a locale used for case insensitive comparison - \return A modified copy of the input + \return An output iterator pointing just after last inserted character or + a modified copy of the input */ template< typename OutputIteratorT, @@ -213,17 +209,9 @@ namespace boost { const_formatter(Format) ); } - //! Replace first algorithm ( case insensitive ) + //! Replace first algorithm ( case insensitive ) /*! - Substitute a first match of the search sequence in the input - with the format sequence. The result is copied to the given output iterator. - Searching is case insensitive. - - \param Input An input sequence - \param Search A string to be searched for. - \param Format A substitute sequence - \param Loc a locale used for case insensitive comparison - \return An output iterator pointing just after last inserted character + \overload */ template inline SequenceT ireplace_first_copy( @@ -240,13 +228,13 @@ namespace boost { //! Replace first algorithm ( case insensitive ) /*! - Substitute a first match of the search sequence in the input - with the format sequence. Input sequence is modified in-place. + Replace the first match of the search string in the input + with the format string. Input sequence is modified in-place. Searching is case insensitive. - \param Input An input sequence - \param Search A string to be searched for. - \param Format A substitute sequence + \param Input An input string + \param Search A string to be searched for + \param Format A substitute string \param Loc a locale used for case insensitive comparison */ template @@ -266,14 +254,17 @@ namespace boost { //! Replace last algorithm /*! - Substitute a last match of the search sequence in the input - with the format sequence. The result is copied to the given output iterator. + Replace the last match of the search string in the input + with the format string. + The result is a modified copy of the input. It is returned as a sequence + or copied to an output iterator. \param Output A output iterator to which the result will be copied - \param Input An input sequence - \param Search A string to be searched for. - \param Format A substitute sequence - \return An output iterator pointing just after last inserted character + \param Input An input string + \param Search A string to be searched for + \param Format A substitute string + \return An output iterator pointing just after last inserted character or + a modified copy of the input */ template< typename OutputIteratorT, @@ -295,13 +286,7 @@ namespace boost { //! Replace last algorithm /*! - Substitute a last match of the search sequence in the input - with the format sequence. The result is a modified copy of the input. - - \param Input An input sequence - \param Search A string to be searched for. - \param Format A substitute sequence - \return A modified copy of the input + \overload */ template inline SequenceT replace_last_copy( @@ -317,12 +302,12 @@ namespace boost { //! Replace last algorithm /*! - Substitute a last match of the search sequence in the input - with the format sequence. Input sequence is modified in-place. + Replace the last match of the search string in the input + with the format string. Input sequence is modified in-place. - \param Input An input sequence - \param Search A string to be searched for. - \param Format A substitute sequence + \param Input An input string + \param Search A string to be searched for + \param Format A substitute string */ template inline void replace_last( @@ -340,16 +325,19 @@ namespace boost { //! Replace last algorithm ( case insensitive ) /*! - Substitute a last match of the search sequence in the input - with the format sequence. The result is copied to the given output iterator. + Replace the last match of the search string in the input + with the format string. + The result is a modified copy of the input. It is returned as a sequence + or copied to an output iterator. Searching is case insensitive. \param Output A output iterator to which the result will be copied - \param Input An input sequence - \param Search A string to be searched for. - \param Format A substitute sequence + \param Input An input string + \param Search A string to be searched for + \param Format A substitute string \param Loc a locale used for case insensitive comparison - \return An output iterator pointing just after last inserted character + \return An output iterator pointing just after last inserted character or + a modified copy of the input */ template< typename OutputIteratorT, @@ -372,15 +360,7 @@ namespace boost { //! Replace last algorithm ( case insensitive ) /*! - Substitute a last match of the search sequence in the input - with the format sequence. The result is a modified copy of the input. - Searching is case insensitive. - - \param Input An input sequence - \param Search A string to be searched for. - \param Format A substitute sequence - \param Loc a locale used for case insensitive comparison - \return A modified copy of the input + \overload */ template inline SequenceT ireplace_last_copy( @@ -397,13 +377,13 @@ namespace boost { //! Replace last algorithm ( case insensitive ) /*! - Substitute a last match of the search sequence in the input - with the format sequence.The input sequence is modified in-place. + Replace the last match of the search string in the input + with the format string.The input sequence is modified in-place. Searching is case insensitive. - \param Input An input sequence - \param Search A string to be searched for. - \param Format A substitute sequence + \param Input An input string + \param Search A string to be searched for + \param Format A substitute string \param Loc a locale used for case insensitive comparison \return A reference to the modified input */ @@ -424,15 +404,18 @@ namespace boost { //! Replace nth algorithm /*! - Substitute an Nth match of the search sequence in the input - with the format sequence. The result is copied to the given output iterator. + Replace an Nth (zero-indexed) match of the search string in the input + with the format string. + The result is a modified copy of the input. It is returned as a sequence + or copied to an output iterator. \param Output A output iterator to which the result will be copied - \param Input An input sequence - \param Search A string to be searched for. + \param Input An input string + \param Search A string to be searched for \param Nth An index of the match to be replaced. The index is 0-based. - \param Format A substitute sequence - \return An output iterator pointing just after last inserted character + \param Format A substitute string + \return An output iterator pointing just after last inserted character or + a modified copy of the input */ template< typename OutputIteratorT, @@ -455,14 +438,7 @@ namespace boost { //! Replace nth algorithm /*! - Substitute an Nth match of the search sequence in the input - with the format sequence. The result is a modified copy of the input. - - \param Input An input sequence - \param Search A string to be searched for. - \param Nth An index of the match to be replaced. The index is 0-based. - \param Format A substitute sequence - \return A modified copy of the input + \overload */ template inline SequenceT replace_nth_copy( @@ -479,13 +455,13 @@ namespace boost { //! Replace nth algorithm /*! - Substitute an Nth match of the search sequence in the input - with the format sequence. Input sequence is modified in-place. + Replace an Nth (zero-indexed) match of the search string in the input + with the format string. Input sequence is modified in-place. - \param Input An input sequence - \param Search A string to be searched for. + \param Input An input string + \param Search A string to be searched for \param Nth An index of the match to be replaced. The index is 0-based. - \param Format A substitute sequence + \param Format A substitute string */ template inline void replace_nth( @@ -504,17 +480,20 @@ namespace boost { //! Replace nth algorithm ( case insensitive ) /*! - Substitute an Nth match of the search sequence in the input - with the format sequence. The result is copied to the given output iterator. + Replace an Nth (zero-indexed) match of the search string in the input + with the format string. + The result is a modified copy of the input. It is returned as a sequence + or copied to an output iterator. Searching is case insensitive. \param Output A output iterator to which the result will be copied - \param Input An input sequence - \param Search A string to be searched for. + \param Input An input string + \param Search A string to be searched for \param Nth An index of the match to be replaced. The index is 0-based. - \param Format A substitute sequence + \param Format A substitute string \param Loc a locale used for case insensitive comparison - \return An output iterator pointing just after last inserted character + \return An output iterator pointing just after last inserted character or + a modified copy of the input */ template< typename OutputIteratorT, @@ -538,16 +517,7 @@ namespace boost { //! Replace nth algorithm ( case insensitive ) /*! - Substitute an Nth match of the search sequence in the input - with the format sequence. The result is a modified copy of the input. - Searching is case insensitive. - - \param Input An input sequence - \param Search A string to be searched for. - \param Nth An index of the match to be replaced. The index is 0-based. - \param Format A substitute sequence - \param Loc a locale used for case insensitive comparison - \return A modified copy of the input + \overload */ template inline SequenceT ireplace_nth_copy( @@ -565,14 +535,14 @@ namespace boost { //! Replace nth algorithm ( case insensitive ) /*! - Substitute an Nth match of the search sequence in the input - with the format sequence. Input sequence is modified in-place. + Replace an Nth (zero-indexed) match of the search string in the input + with the format string. Input sequence is modified in-place. Searching is case insensitive. - \param Input An input sequence - \param Search A string to be searched for. + \param Input An input string + \param Search A string to be searched for \param Nth An index of the match to be replaced. The index is 0-based. - \param Format A substitute sequence + \param Format A substitute string \param Loc a locale used for case insensitive comparison */ template @@ -593,14 +563,17 @@ namespace boost { //! Replace all algorithm /*! - Substitute all occurrences of the search sequence in the input - with the format sequence. The result is copied to the given output iterator. + Replace all occurrences of the search string in the input + with the format string. + The result is a modified copy of the input. It is returned as a sequence + or copied to an output iterator. \param Output A output iterator to which the result will be copied - \param Input An input sequence - \param Search A string to be searched for. - \param Format A substitute sequence - \return An output iterator pointing just after last inserted character + \param Input An input string + \param Search A string to be searched for + \param Format A substitute string + \return An output iterator pointing just after last inserted character or + a modified copy of the input */ template< typename OutputIteratorT, @@ -622,13 +595,7 @@ namespace boost { //! Replace all algorithm /*! - Substitute all occurrences of the search sequence in the input - with the format sequence. The result is a modified copy of the input. - - \param Input An input sequence - \param Search A string to be searched for. - \param Format A substitute sequence - \return A modified copy of the input + \overload */ template inline SequenceT replace_all_copy( @@ -644,12 +611,12 @@ namespace boost { //! Replace all algorithm /*! - Substitute all occurrences of the search sequence in the input - with the format sequence. The input sequence is modified in-place. + Replace all occurrences of the search string in the input + with the format string. The input sequence is modified in-place. - \param Input An input sequence - \param Search A string to be searched for. - \param Format A substitute sequence + \param Input An input string + \param Search A string to be searched for + \param Format A substitute string \return A reference to the modified input */ template @@ -668,16 +635,19 @@ namespace boost { //! Replace all algorithm ( case insensitive ) /*! - Substitute all occurrences of the search sequence in the input - with the format sequence. The result is copied to the given output iterator. + Replace all occurrences of the search string in the input + with the format string. + The result is a modified copy of the input. It is returned as a sequence + or copied to an output iterator. Searching is case insensitive. \param Output A output iterator to which the result will be copied - \param Input An input sequence - \param Search A string to be searched for. - \param Format A substitute sequence + \param Input An input string + \param Search A string to be searched for + \param Format A substitute string \param Loc a locale used for case insensitive comparison - \return An output iterator pointing just after last inserted character + \return An output iterator pointing just after last inserted character or + a modified copy of the input */ template< typename OutputIteratorT, @@ -700,15 +670,7 @@ namespace boost { //! Replace all algorithm ( case insensitive ) /*! - Substitute all occurrences of the search sequence in the input - with the format sequence. The result is a modified copy of the input. - Searching is case insensitive. - - \param Input An input sequence - \param Search A string to be searched for. - \param Format A substitute sequence - \param Loc a locale used for case insensitive comparison - \return A modified copy of the input + \overload */ template inline SequenceT ireplace_all_copy( @@ -725,13 +687,13 @@ namespace boost { //! Replace all algorithm ( case insensitive ) /*! - Substitute all occurrences of the search sequence in the input - with the format sequence.The input sequence is modified in-place. + Replace all occurrences of the search string in the input + with the format string.The input sequence is modified in-place. Searching is case insensitive. - \param Input An input sequence - \param Search A string to be searched for. - \param Format A substitute sequence + \param Input An input string + \param Search A string to be searched for + \param Format A substitute string \param Loc a locale used for case insensitive comparison */ template @@ -751,16 +713,19 @@ namespace boost { //! Replace head algorithm /*! - Replace the head of the input with the given format sequence. - Head is a prefix of a seqence of given size. - If the sequence is shorter then required, whole sequence if - considered to be the head. The result is copied to the given output iterator. - + Replace the head of the input with the given format string. + Head is a prefix of a string of given size. + If the sequence is shorter then required, whole string if + 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. + \param Output A output iterator to which the result will be copied - \param Input An input sequence + \param Input An input string \param N A length of the head - \param Format A substitute sequence - \return An output iterator pointing just after last inserted character + \param Format A substitute string + \return An output iterator pointing just after last inserted character or + a modified copy of the input */ template< typename OutputIteratorT, @@ -781,15 +746,7 @@ namespace boost { //! Replace head algorithm /*! - Replace the head of the input with the given format sequence. - Head is a prefix of a seqence of given size. - If the sequence is shorter then required, whole sequence if - considered to be the head. The result is a modified copy of the input. - - \param Input An input sequence - \param N A length of the head - \param Format A substitute sequence - \return A modified copy of the input + \overload */ template inline SequenceT replace_head_copy( @@ -805,14 +762,14 @@ namespace boost { //! Replace head algorithm /*! - Replace the head of the input with the given format sequence. - Head is a prefix of a seqence of given size. + Replace the head of the input with the given format string. + Head is a prefix of a string of given size. If the sequence is shorter then required, whole sequence if considered to be the head. The input sequence is modified in-place. - \param Input An input sequence + \param Input An input string \param N A length of the head - \param Format A substitute sequence + \param Format A substitute string */ template inline void replace_head( @@ -830,16 +787,19 @@ namespace boost { //! Replace tail algorithm /*! - Replace the tail of the input with the given format sequence. - Tail is a suffix of a seqence of given size. - If the sequence is shorter then required, whole sequence if - considered to be the tail. The result is copied to the given output iterator. + Replace the tail of the input with the given format string. + Tail is a suffix of a string of given size. + If the sequence is shorter then required, whole string if + considered to be the tail. + The result is a modified copy of the input. It is returned as a sequence + or copied to an output iterator. \param Output A output iterator to which the result will be copied - \param Input An input sequence + \param Input An input string \param N A length of the head - \param Format A substitute sequence - \return An output iterator pointing just after last inserted character + \param Format A substitute string + \return An output iterator pointing just after last inserted character or + a modified copy of the input */ template< typename OutputIteratorT, @@ -860,15 +820,7 @@ namespace boost { //! Replace tail algorithm /*! - Replace the tail of the input with the given format sequence. - Tail is a suffix of a seqence of given size. - If the sequence is shorter then required, whole sequence is - considered to be the tail. The result is a modified copy of the input. - - \param Input An input sequence - \param N A length of the head - \param Format A substitute sequence - \return A modified copy of the input + \overload */ template inline SequenceT replace_tail_copy( @@ -885,13 +837,13 @@ namespace boost { //! Replace tail algorithm /*! Replace the tail of the input with the given format sequence. - Tail is a suffix of a seqence of given size. - If the sequence is shorter then required, whole sequence is + Tail is a suffix of a string of given size. + If the sequence is shorter then required, whole string is considered to be the tail. The input sequence is modified in-place. - \param Input An input sequence + \param Input An input string \param N A length of the head - \param Format A substitute sequence + \param Format A substitute string */ template inline void replace_tail( diff --git a/include/boost/algorithm/string/trim.hpp b/include/boost/algorithm/string/trim.hpp index eebda8a..bb8e02a 100644 --- a/include/boost/algorithm/string/trim.hpp +++ b/include/boost/algorithm/string/trim.hpp @@ -38,15 +38,15 @@ namespace boost { /*! Remove all leading spaces from the input. Supplied predicate is used to determine which character is a space. - The result is a trimmed copy if the input. It is returned as a sequence - or copied to an output iterator + The result is a trimmed copy of the input. It is returned as a sequence + or copied to an output iterator \param Output A output iterator to which the result will be copied \param Input An input collection \param IsSpace An unary predicate identifying spaces \return - An output iterator pointing just after last inserted character or - a copy of the input + An output iterator pointing just after last inserted character or + a copy of the input */ template inline OutputIteratorT trim_left_copy_if( @@ -67,8 +67,8 @@ namespace boost { //! Left trim - parametric /*! - \overload - */ + \overload + */ template inline SequenceT trim_left_copy_if(const SequenceT& Input, PredicateT IsSpace) { @@ -83,11 +83,11 @@ namespace boost { //! Left trim - parametric /*! Remove all leading spaces from the input. - The result is a trimmed copy if the input. + The result is a trimmed copy of the input. \param Input An input sequence \param Loc a locale used for 'space' classification - \return A trimmed copy if the input + \return A trimmed copy of the input */ template inline SequenceT trim_left_copy(const SequenceT& Input, const std::locale& Loc=std::locale()) @@ -140,15 +140,15 @@ namespace boost { /*! Remove all trailing spaces from the input. Supplied predicate is used to determine which character is a space. - The result is a trimmed copy if the input. It is returned as a sequence - or copied to an output iterator + The result is a trimmed copy of the input. It is returned as a sequence + or copied to an output iterator \param Output A output iterator to which the result will be copied \param Input An input collection \param IsSpace An unary predicate identifying spaces \return - An output iterator pointing just after last inserted character or - a copy of the input + An output iterator pointing just after last inserted character or + a copy of the input */ template inline OutputIteratorT trim_right_copy_if( @@ -169,7 +169,7 @@ namespace boost { //! Right trim - parametric /*! - \overload + \overload */ template inline SequenceT trim_right_copy_if(const SequenceT& Input, PredicateT IsSpace) @@ -186,11 +186,11 @@ namespace boost { //! Right trim /*! Remove all trailing spaces from the input. - The result is a trimmed copy if the input + The result is a trimmed copy of the input \param Input An input sequence \param Loc A locale used for 'space' classification - \return A trimmed copy if the input + \return A trimmed copy of the input */ template inline SequenceT trim_right_copy(const SequenceT& Input, const std::locale& Loc=std::locale()) @@ -246,15 +246,15 @@ namespace boost { /*! Remove all trailing and leading spaces from the input. Supplied predicate is used to determine which character is a space. - The result is a trimmed copy if the input. It is returned as a sequence - or copied to an output iterator + The result is a trimmed copy of the input. It is returned as a sequence + or copied to an output iterator \param Output A output iterator to which the result will be copied \param Input An input collection \param IsSpace An unary predicate identifying spaces \return - An output iterator pointing just after last inserted character or - a copy of the input + An output iterator pointing just after last inserted character or + a copy of the input */ template inline OutputIteratorT trim_copy_if( @@ -281,7 +281,7 @@ namespace boost { //! Trim - parametric /*! - \overload + \overload */ template inline SequenceT trim_copy_if(const SequenceT& Input, PredicateT IsSpace) @@ -305,11 +305,11 @@ namespace boost { //! Trim /*! Remove all leading and trailing spaces from the input. - The result is a trimmed copy if the input + The result is a trimmed copy of the input \param Input An input sequence \param Loc A locale used for 'space' classification - \return A trimmed copy if the input + \return A trimmed copy of the input */ template inline SequenceT trim_copy( const SequenceT& Input, const std::locale& Loc=std::locale() )