diff --git a/doc/boyer_moore.qbk b/doc/boyer_moore.qbk index 4130143..13c9666 100644 --- a/doc/boyer_moore.qbk +++ b/doc/boyer_moore.qbk @@ -14,7 +14,7 @@ http://www.boost.org/LICENSE_1_0.txt) [heading Overview] -The header file 'boyer_moore.hpp' contains an an implementation of the Boyer-Moore algorithm for searching sequences of values. +The header file 'boyer_moore.hpp' contains an implementation of the Boyer-Moore algorithm for searching sequences of values. The Boyer–Moore string search algorithm is a particularly efficient string searching algorithm, and it has been the standard benchmark for the practical string search literature. The Boyer-Moore algorithm was invented by Bob Boyer and J. Strother Moore, and published in the October 1977 issue of the Communications of the ACM , and a copy of that article is available at [@http://www.cs.utexas.edu/~moore/publications/fstrpos.pdf]. @@ -26,7 +26,7 @@ Nomenclature: I refer to the sequence being searched for as the "pattern", and t [heading Interface] -For flexibility, the Boyer-Moore algorithm has has two interfaces; an object-based interface and a procedural one. The object-based interface builds the tables in the constructor, and uses operator () to perform the search. The procedural interface builds the table and does the search all in one step. If you are going to be searching for the same pattern in multiple corpora, then you should use the object interface, and only build the tables once. +For flexibility, the Boyer-Moore algorithm has two interfaces; an object-based interface and a procedural one. The object-based interface builds the tables in the constructor, and uses operator () to perform the search. The procedural interface builds the table and does the search all in one step. If you are going to be searching for the same pattern in multiple corpora, then you should use the object interface, and only build the tables once. Here is the object interface: `` diff --git a/doc/boyer_moore_horspool.qbk b/doc/boyer_moore_horspool.qbk index 1c37a8b..3a10c32 100644 --- a/doc/boyer_moore_horspool.qbk +++ b/doc/boyer_moore_horspool.qbk @@ -14,7 +14,7 @@ http://www.boost.org/LICENSE_1_0.txt) [heading Overview] -The header file 'boyer_moore_horspool.hpp' contains an an implementation of the Boyer-Moore-Horspool algorithm for searching sequences of values. +The header file 'boyer_moore_horspool.hpp' contains an implementation of the Boyer-Moore-Horspool algorithm for searching sequences of values. The Boyer-Moore-Horspool search algorithm was published by Nigel Horspool in 1980. It is a refinement of the Boyer-Moore algorithm that trades space for time. It uses less space for internal tables than Boyer-Moore, and has poorer worst-case performance. @@ -24,7 +24,7 @@ The Boyer-Moore-Horspool algorithm cannot be used with comparison predicates lik Nomenclature: I refer to the sequence being searched for as the "pattern", and the sequence being searched in as the "corpus". -For flexibility, the Boyer-Moore-Horspool algorithm has has two interfaces; an object-based interface and a procedural one. The object-based interface builds the tables in the constructor, and uses operator () to perform the search. The procedural interface builds the table and does the search all in one step. If you are going to be searching for the same pattern in multiple corpora, then you should use the object interface, and only build the tables once. +For flexibility, the Boyer-Moore-Horspool algorithm has two interfaces; an object-based interface and a procedural one. The object-based interface builds the tables in the constructor, and uses operator () to perform the search. The procedural interface builds the table and does the search all in one step. If you are going to be searching for the same pattern in multiple corpora, then you should use the object interface, and only build the tables once. Here is the object interface: `` diff --git a/doc/knuth_morris_pratt.qbk b/doc/knuth_morris_pratt.qbk index 8ed01f1..7b184cf 100644 --- a/doc/knuth_morris_pratt.qbk +++ b/doc/knuth_morris_pratt.qbk @@ -14,7 +14,7 @@ http://www.boost.org/LICENSE_1_0.txt) [heading Overview] -The header file 'knuth_morris_pratt.hpp' contains an an implementation of the Knuth-Morris-Pratt algorithm for searching sequences of values. +The header file 'knuth_morris_pratt.hpp' contains an implementation of the Knuth-Morris-Pratt algorithm for searching sequences of values. The basic premise of the Knuth-Morris-Pratt algorithm is that when a mismatch occurs, there is information in the pattern being searched for that can be used to determine where the next match could begin, enabling the skipping of some elements of the corpus that have already been examined. @@ -28,7 +28,7 @@ However, the Knuth-Morris-Pratt algorithm cannot be used with comparison predica Nomenclature: I refer to the sequence being searched for as the "pattern", and the sequence being searched in as the "corpus". -For flexibility, the Knuth-Morris-Pratt algorithm has has two interfaces; an object-based interface and a procedural one. The object-based interface builds the table in the constructor, and uses operator () to perform the search. The procedural interface builds the table and does the search all in one step. If you are going to be searching for the same pattern in multiple corpora, then you should use the object interface, and only build the tables once. +For flexibility, the Knuth-Morris-Pratt algorithm has two interfaces; an object-based interface and a procedural one. The object-based interface builds the table in the constructor, and uses operator () to perform the search. The procedural interface builds the table and does the search all in one step. If you are going to be searching for the same pattern in multiple corpora, then you should use the object interface, and only build the tables once. Here is the object interface: `` diff --git a/doc/ordered-hpp.qbk b/doc/ordered-hpp.qbk index 687066a..718f1f9 100644 --- a/doc/ordered-hpp.qbk +++ b/doc/ordered-hpp.qbk @@ -73,7 +73,7 @@ Given the sequence `{ 1, 2, 3, 4, 5, 9 }`, `is_sorted_until ( beg, end, std::l There are also a set of "wrapper functions" for is_ordered which make it easy to see if an entire sequence is ordered. These functions return a boolean indicating success or failure rather than an iterator to where the out of order items were found. -To test if a sequence is increasing (each element at least as large as the preceeding one): +To test if a sequence is increasing (each element at least as large as the preceding one): `` namespace boost { namespace algorithm { template @@ -84,7 +84,7 @@ namespace boost { namespace algorithm { }} `` -To test if a sequence is decreasing (each element no larger than the preceeding one): +To test if a sequence is decreasing (each element no larger than the preceding one): `` namespace boost { namespace algorithm { @@ -96,7 +96,7 @@ namespace boost { namespace algorithm { }} `` -To test if a sequence is strictly increasing (each element larger than the preceeding one): +To test if a sequence is strictly increasing (each element larger than the preceding one): `` namespace boost { namespace algorithm { template @@ -107,7 +107,7 @@ namespace boost { namespace algorithm { }} `` -To test if a sequence is strictly decreasing (each element smaller than the preceeding one): +To test if a sequence is strictly decreasing (each element smaller than the preceding one): `` namespace boost { namespace algorithm { template diff --git a/include/boost/algorithm/cxx11/is_partitioned.hpp b/include/boost/algorithm/cxx11/is_partitioned.hpp index d647183..e939e05 100644 --- a/include/boost/algorithm/cxx11/is_partitioned.hpp +++ b/include/boost/algorithm/cxx11/is_partitioned.hpp @@ -24,11 +24,11 @@ namespace boost { namespace algorithm { using std::is_partitioned; // Section 25.3.13 #else /// \fn is_partitioned ( InputIterator first, InputIterator last, UnaryPredicate p ) -/// \brief Tests to see if a sequence is partititioned according to a predicate +/// \brief Tests to see if a sequence is partitioned according to a predicate /// /// \param first The start of the input sequence /// \param last One past the end of the input sequence -/// \param p The predicicate to test the values with +/// \param p The predicate to test the values with /// \note This function is part of the C++2011 standard library. /// We will use the standard one if it is available, /// otherwise we have our own implementation. @@ -51,7 +51,7 @@ bool is_partitioned ( InputIterator first, InputIterator last, UnaryPredicate p /// \brief Generates an increasing sequence of values, and stores them in the input Range. /// /// \param r The input range -/// \param p The predicicate to test the values with +/// \param p The predicate to test the values with /// template bool is_partitioned ( const Range &r, UnaryPredicate p ) diff --git a/include/boost/algorithm/string/detail/find_format.hpp b/include/boost/algorithm/string/detail/find_format.hpp index 0bf3b93..1612b93 100644 --- a/include/boost/algorithm/string/detail/find_format.hpp +++ b/include/boost/algorithm/string/detail/find_format.hpp @@ -56,7 +56,7 @@ namespace boost { // Copy the beginning of the sequence Output = std::copy( ::boost::begin(Input), ::boost::begin(M), Output ); // Format find result - // Copy formated result + // Copy formatted result Output = std::copy( ::boost::begin(M.format_result()), ::boost::end(M.format_result()), Output ); // Copy the rest of the sequence Output = std::copy( M.end(), ::boost::end(Input), Output ); @@ -119,7 +119,7 @@ namespace boost { InputT Output; // Copy the beginning of the sequence boost::algorithm::detail::insert( Output, ::boost::end(Output), ::boost::begin(Input), M.begin() ); - // Copy formated result + // Copy formatted result boost::algorithm::detail::insert( Output, ::boost::end(Output), M.format_result() ); // Copy the rest of the sequence boost::algorithm::detail::insert( Output, ::boost::end(Output), M.end(), ::boost::end(Input) ); diff --git a/include/boost/algorithm/string/detail/find_format_all.hpp b/include/boost/algorithm/string/detail/find_format_all.hpp index bdd5f88..51ad566 100644 --- a/include/boost/algorithm/string/detail/find_format_all.hpp +++ b/include/boost/algorithm/string/detail/find_format_all.hpp @@ -58,7 +58,7 @@ namespace boost { { // Copy the beginning of the sequence Output = std::copy( LastMatch, M.begin(), Output ); - // Copy formated result + // Copy formatted result Output = std::copy( ::boost::begin(M.format_result()), ::boost::end(M.format_result()), Output ); // Proceed to the next match @@ -135,7 +135,7 @@ namespace boost { { // Copy the beginning of the sequence boost::algorithm::detail::insert( Output, ::boost::end(Output), LastMatch, M.begin() ); - // Copy formated result + // Copy formatted result boost::algorithm::detail::insert( Output, ::boost::end(Output), M.format_result() ); // Proceed to the next match @@ -218,7 +218,7 @@ namespace boost { // Adjust search iterator SearchIt=M.end(); - // Copy formated replace to the storage + // Copy formatted replace to the storage ::boost::algorithm::detail::copy_to_storage( Storage, M.format_result() ); // Find range for a next match diff --git a/include/boost/algorithm/string/detail/finder.hpp b/include/boost/algorithm/string/detail/finder.hpp index 45bcb7d..93310d0 100644 --- a/include/boost/algorithm/string/detail/finder.hpp +++ b/include/boost/algorithm/string/detail/finder.hpp @@ -92,7 +92,7 @@ namespace boost { // find last functor -----------------------------------------------// - // find the last match a subseqeunce in the sequence ( functor ) + // find the last match a subsequence in the sequence ( functor ) /* Returns a pair marking the subsequence in the sequence. If the find fails, returns diff --git a/include/boost/algorithm/string/detail/finder_regex.hpp b/include/boost/algorithm/string/detail/finder_regex.hpp index 673d93a..01bf5a0 100644 --- a/include/boost/algorithm/string/detail/finder_regex.hpp +++ b/include/boost/algorithm/string/detail/finder_regex.hpp @@ -60,14 +60,14 @@ namespace boost { return *this; } - // Match result retrival + // Match result retrieval const match_results_type& match_results() const { return m_MatchResults; } private: - // Saved matchresult + // Saved match result match_results_type m_MatchResults; }; diff --git a/include/boost/algorithm/string/find.hpp b/include/boost/algorithm/string/find.hpp index cc99ca1..da1cb61 100644 --- a/include/boost/algorithm/string/find.hpp +++ b/include/boost/algorithm/string/find.hpp @@ -86,7 +86,7 @@ namespace boost { //! Find first algorithm ( case insensitive ) /*! - Search for the first occurence of the substring in the input. + Search for the first occurrence of the substring in the input. Searching is case insensitive. \param Input A string which will be searched. @@ -293,7 +293,7 @@ namespace boost { If the "token compress mode" is enabled, adjacent tokens are considered to be one match. \param Input A input string. - \param Pred An unary predicate to identify a token + \param Pred A unary predicate to identify a token \param eCompress Enable/Disable compressing of adjacent tokens \return An \c iterator_range delimiting the match. diff --git a/include/boost/algorithm/string/formatter.hpp b/include/boost/algorithm/string/formatter.hpp index ab5921e..c2c13eb 100644 --- a/include/boost/algorithm/string/formatter.hpp +++ b/include/boost/algorithm/string/formatter.hpp @@ -39,7 +39,7 @@ namespace boost { Constructs a \c const_formatter. Const formatter always returns the same value, regardless of the parameter. - \param Format A predefined value used as a result for formating + \param Format A predefined value used as a result for formatting \return An instance of the \c const_formatter object. */ template @@ -95,7 +95,7 @@ namespace boost { to extract a portion of the formatted sequence. The first finder's match is returned as a result - \param Finder a finder used to select a portion of the formated sequence + \param Finder a finder used to select a portion of the formatted sequence \return An instance of the \c dissect_formatter object. */ template diff --git a/include/boost/algorithm/string/predicate_facade.hpp b/include/boost/algorithm/string/predicate_facade.hpp index c8319f7..a9753fc 100644 --- a/include/boost/algorithm/string/predicate_facade.hpp +++ b/include/boost/algorithm/string/predicate_facade.hpp @@ -15,7 +15,7 @@ /* \file boost/algorith/string/predicate_facade.hpp - This file containes predicate_facade definition. This template class is used + This file contains predicate_facade definition. This template class is used to identify classification predicates, so they can be combined using composition operators. */ diff --git a/include/boost/algorithm/string/regex_find_format.hpp b/include/boost/algorithm/string/regex_find_format.hpp index f698004..409afc2 100644 --- a/include/boost/algorithm/string/regex_find_format.hpp +++ b/include/boost/algorithm/string/regex_find_format.hpp @@ -32,7 +32,7 @@ namespace boost { Construct the \c regex_finder. Finder uses the regex engine to search for a match. Result is given in \c regex_search_result. This is an extension - of the iterator_range. In addition it containes match results + of the iterator_range. In addition it contains match results from the \c regex_search algorithm. \param Rx A regular expression diff --git a/include/boost/algorithm/string/trim.hpp b/include/boost/algorithm/string/trim.hpp index eb408a3..be57cd9 100644 --- a/include/boost/algorithm/string/trim.hpp +++ b/include/boost/algorithm/string/trim.hpp @@ -50,7 +50,7 @@ namespace boost { \param Output An output iterator to which the result will be copied \param Input An input range - \param IsSpace An unary predicate identifying spaces + \param IsSpace A unary predicate identifying spaces \return An output iterator pointing just after the last inserted character or a copy of the input @@ -118,7 +118,7 @@ namespace boost { The input sequence is modified in-place. \param Input An input sequence - \param IsSpace An unary predicate identifying spaces + \param IsSpace A unary predicate identifying spaces */ template inline void trim_left_if(SequenceT& Input, PredicateT IsSpace) @@ -158,7 +158,7 @@ namespace boost { \param Output An output iterator to which the result will be copied \param Input An input range - \param IsSpace An unary predicate identifying spaces + \param IsSpace A unary predicate identifying spaces \return An output iterator pointing just after the last inserted character or a copy of the input @@ -228,7 +228,7 @@ namespace boost { The input sequence is modified in-place. \param Input An input sequence - \param IsSpace An unary predicate identifying spaces + \param IsSpace A unary predicate identifying spaces */ template inline void trim_right_if(SequenceT& Input, PredicateT IsSpace) @@ -270,7 +270,7 @@ namespace boost { \param Output An output iterator to which the result will be copied \param Input An input range - \param IsSpace An unary predicate identifying spaces + \param IsSpace A unary predicate identifying spaces \return An output iterator pointing just after the last inserted character or a copy of the input @@ -352,7 +352,7 @@ namespace boost { The input sequence is modified in-place. \param Input An input sequence - \param IsSpace An unary predicate identifying spaces + \param IsSpace A unary predicate identifying spaces */ template inline void trim_if(SequenceT& Input, PredicateT IsSpace) diff --git a/include/boost/algorithm/string/trim_all.hpp b/include/boost/algorithm/string/trim_all.hpp index 70fd041..a616f7f 100644 --- a/include/boost/algorithm/string/trim_all.hpp +++ b/include/boost/algorithm/string/trim_all.hpp @@ -49,7 +49,7 @@ namespace boost { The result is a trimmed copy of the input \param Input An input sequence - \param IsSpace An unary predicate identifying spaces + \param IsSpace A unary predicate identifying spaces \return A trimmed copy of the input */ template @@ -70,7 +70,7 @@ namespace boost { The input sequence is modified in-place. \param Input An input sequence - \param IsSpace An unary predicate identifying spaces + \param IsSpace A unary predicate identifying spaces */ template inline void trim_all_if(SequenceT& Input, PredicateT IsSpace) @@ -126,7 +126,7 @@ namespace boost { \param Input An input sequence \param Fill A string used to fill the inner spaces - \param IsSpace An unary predicate identifying spaces + \param IsSpace A unary predicate identifying spaces \return A trimmed copy of the input */ template @@ -149,7 +149,7 @@ namespace boost { \param Input An input sequence \param Fill A string used to fill the inner spaces - \param IsSpace An unary predicate identifying spaces + \param IsSpace A unary predicate identifying spaces */ template inline void trim_fill_if(SequenceT& Input, const RangeT& Fill, PredicateT IsSpace) diff --git a/include/boost/algorithm/string_regex.hpp b/include/boost/algorithm/string_regex.hpp index 6fd8ad9..791aa18 100644 --- a/include/boost/algorithm/string_regex.hpp +++ b/include/boost/algorithm/string_regex.hpp @@ -13,7 +13,7 @@ /*! \file Cumulative include for string_algo library. - In addtion to string.hpp contains also regex-related stuff. + In addition to string.hpp contains also regex-related stuff. */ #include diff --git a/string/doc/concept.xml b/string/doc/concept.xml index fd432c2..8e9c4a8 100644 --- a/string/doc/concept.xml +++ b/string/doc/concept.xml @@ -162,8 +162,8 @@ boost::iterator_range<std::string> simple_finder( Similarly to finders, formatters generalize format operations. When a finder is used to - select a part of the input, formatter takes this selection and performs some formating - on it. Algorithms can abstract from formating using a formatter. + select a part of the input, formatter takes this selection and performs some formatting + on it. Algorithms can abstract from formatting using a formatter. Examples @@ -171,7 +171,7 @@ boost::iterator_range<std::string> simple_finder( - Formatter implemented as a class. This Formatter does not perform any formating and + Formatter implemented as a class. This Formatter does not perform any formatting and returns the match, repackaged. operator() is templated, so that the Formatter can be used on any Finder type. diff --git a/string/doc/release_notes.xml b/string/doc/release_notes.xml index 9314064..dd412d5 100644 --- a/string/doc/release_notes.xml +++ b/string/doc/release_notes.xml @@ -36,7 +36,7 @@ New comparison predicates is_less, is_not_greater - Negative indexes support (like Perl) in various algorihtms + Negative indexes support (like Perl) in various algorithms (*_head/tail, *_nth). diff --git a/string/example/predicate_example.cpp b/string/example/predicate_example.cpp index c89c653..473ab8b 100644 --- a/string/example/predicate_example.cpp +++ b/string/example/predicate_example.cpp @@ -33,7 +33,7 @@ int main() cout << "str1 ends with \"123\": " << (ends_with( str1, string("123") )?"true":"false") << endl; - // Check if str1 containes 'xxx' + // Check if str1 contains 'xxx' cout << "str1 contains \"xxx\": " << (contains( str1, string("xxx") )?"true":"false") << endl; diff --git a/string/test/regex_test.cpp b/string/test/regex_test.cpp index 8e6b89a..2951a4c 100644 --- a/string/test/regex_test.cpp +++ b/string/test/regex_test.cpp @@ -114,7 +114,7 @@ static void replace_test() string fmt2("_xXx_"); vector vec1( str1.begin(), str1.end() ); - // inmutable tests + // immutable tests // basic tests BOOST_CHECK( replace_regex_copy( str1, rx1, fmt1 )==string("123_A1C_xxxa23cXXXa456c321") ); diff --git a/test/hex_test4.cpp b/test/hex_test4.cpp index 002dd00..935293c 100644 --- a/test/hex_test4.cpp +++ b/test/hex_test4.cpp @@ -129,7 +129,7 @@ void test_nonhex_input4 () { } void test_nonhex_input () { -// BOOST_TEST_MESSAGE ( "Non hex input tests for for boost::algorithm::unhex" ); +// BOOST_TEST_MESSAGE ( "Non hex input tests for boost::algorithm::unhex" ); test_nonhex_input1 (); test_nonhex_input2 (); test_nonhex_input3 ();