Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r78393 - trunk/libs/algorithm/string/doc
From: marshall_at_[hidden]
Date: 2012-05-09 13:11:45


Author: marshall
Date: 2012-05-09 13:11:43 EDT (Wed, 09 May 2012)
New Revision: 78393
URL: http://svn.boost.org/trac/boost/changeset/78393

Log:
Fixed error in string docs
Text files modified:
   trunk/libs/algorithm/string/doc/usage.xml | 11 ++++++++---
   1 files changed, 8 insertions(+), 3 deletions(-)

Modified: trunk/libs/algorithm/string/doc/usage.xml
==============================================================================
--- trunk/libs/algorithm/string/doc/usage.xml (original)
+++ trunk/libs/algorithm/string/doc/usage.xml 2012-05-09 13:11:43 EDT (Wed, 09 May 2012)
@@ -135,12 +135,12 @@
         << endl; // prints "command.com is an executable"
     
     //..
- char text1[]="hello world!";
+ char text1[]="hello";
     cout
         << text1
- << (all( text1, is_lower() )? "is": "is not")
+ << (all( text1, is_lower() )? " is": " is not")
         << " written in the lower case"
- << endl; // prints "hello world! is written in the lower case"
+ << endl; // prints "hello is written in the lower case"
         </programlisting>
         <para>
             The predicates determine whether if a substring is contained in the input string
@@ -150,6 +150,11 @@
             <headername>boost/algorithm/string/predicate.hpp</headername> for more details.
         </para>
         <para>
+ Note that if we had used "hello world" as the input to the test, it would have
+ output "hello world is not written in the lower case" because the space in the
+ input string is not a lower case letter.
+ </para>
+ <para>
             In addition the algorithm <functionname>all()</functionname> checks
             all elements of a container to satisfy a condition specified by a predicate.
             This predicate can be any unary predicate, but the library provides a bunch of


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk